Screen Interface

Loading...

Overview

See MDN Screen Interface

Basic Properties

orientation

Return the color/pixel Depth of the screen, as it's currently configured (e.g., in the Monitors control panel).

window.screen.orientation

onorientationchange

window.screen.onorientationchange = function(){}

Available Top/Left, Height/Width

These properties return the available space on the Screen that's not being used by the operating system. For example, OS X has a menu bar that uses some of the screen pixels at the top of the screen. A dock can be positioned on the left of the screen and will consume a variable amount of pixels, depending on its configured size.

window.screen.availTop window.screen.availLeft window.screen.availHeight window.screen.availWidth

Screen Top/Left, Height/Width

Return the total screen size in pixels, as it's currently configured (e.g., in the Monitors control panel).

window.screen.top window.screen.left window.screen.height window.screen.width

Color/Pixel Depth

Return the color/pixel Depth of the screen, as it's currently configured (e.g., in the Monitors control panel).

window.screen.colorDepth window.screen.pixelDepth