Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Window.windowState

This article needs a technical review. How you can help.

Check for window state:

State value Descrption
STATE_MAXIMIZED 1 The window is maximized.
STATE_MINIMIZED 2 The window is minimized.
STATE_NORMAL 3 The window is normal.
STATE_FULLSCREEN 4 The window is in full screen mode.

Sample:

if (window.windowState === 1) {} // check if window is maximized
else if (window.windowState === 2) {} // check if window is minimized
else if (window.windowState === 3) {} // check if window is normal
else if (window.windowState === 4) {} // check if window is in fullscreen mode
else {}

Note:

More info on window events and window.state can be seen here.

 

Document Tags and Contributors

 Contributors to this page: fscholz, kscarfone, jswisher, NatureShade
 Last updated by: fscholz,