The Screen
interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen
.
Note that browsers determine which screen to report as current by detecting which screen has the center of the browser window.
-
Screen.lockOrientation
Non-Standard
Deprecated
-
Lock the screen orientation (only works in fullscreen or for installed apps)
-
Screen.unlockOrientation
Non-Standard
Deprecated
-
Unlock the screen orientation (only works in fullscreen or for installed apps)
Methods inherited from EventTarget
:
-
EventTarget.addEventListener()
-
Registers an event handler of a specific event type on the EventTarget
.
-
EventTarget.removeEventListener()
-
Removes an event listener from the EventTarget
.
-
EventTarget.dispatchEvent()
-
Dispatches an event to this EventTarget
.
if (screen.pixelDepth < 8) {
} else {
}