Name
Screen: provides information about the display â JavaScript 1.2: Object â Screen
Synopsis
screen
Properties
-
availHeight
Specifies the available height, in pixels, of the screen on which the web browser is displayed. On operating systems such as Windows, this available height does not include vertical space allocated to semipermanent features, such as the task bar at the bottom of the screen.
-
availWidth
Specifies the available width, in pixels, of the screen on which the web browser is displayed. On operating systems such as Windows, this available width does not include horizontal space allocated to semipermanent features, such as application shortcut bars.
-
colorDepth
Specifies the color depth of the screen in bits per pixel.
-
height
Specifies the total height, in pixels, of the screen on which the web browser is displayed. See also
availHeight
.-
width
Specifies the total width, in pixels, of the screen on which the web browser is displayed. See also
availWidth
.
Description
The screen
property of every Window refers to a Screen object. The properties of this global object contain information about the screen on which the browser is displayed. JavaScript programs can use this information to optimize their output for the userâs display capabilities. For example, a program can choose between large and small images based on the display size and between 8-bit and 16-bit color images based on the screenâs color depth. A JavaScript program can also use the information about the size ...
Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.