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 of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access