Window: screen property


目录

The Window property screen returns a reference to the screen object associated with the window. The screen object, implementing the Screen interface, is a special object for inspecting properties of the screen on which the current window is being rendered.

Value

A Screen object.

Examples

if (screen.pixelDepth < 8) {
  // use low-color version of page
} else {
  // use regular, colorful page
}

Specifications

Browser compatibility


版本号 #3
由 壳壳虫 创建于 2026-10-31 03:27:53 UTC
由 cocobook-sync 更新于 2026-11-04 17:35:18 UTC