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.
sizemode
Type: one of the values below
The state of the window. It can have one of the following values:
maximized
The window is maximized, and occupies the full size of the screen.
normal
The window appears in a normal state at the desired size.

This attribute is used to save and restore the state of a window (together with the persist attribute) and for CSS styles (e.g. to hide the resizer grippy on maximized windows).

Note: When a window is minimized, the sizemode attribute is not updated. This is done so that if a window is closed while minimized, its persisted sizemode attribute wouldn't be minimized.

Setting this attribute does not change the window state. Use window.maximize(), window.restore(), or window.minimize() to change the window state.

To get the window state from JavaScript code, use window.windowState. Listen to the sizemodechange event dispatched to the DOM window to get notified when the window state changes.

Note: Prior to Gecko 13.0, this did not work on Mac OS X.

Note: Prior to Gecko 1.9.2, this was not always reliable.

Issues with this attribute (at least on Firefox 3):

  • sizemode is only updated when the value of the persist attribute on the root element (such as <window>) contains sizemode.

 

Document Tags and Contributors

 Contributors to this page: Sheppy, kscarfone, trevorh, Nickolay, pippijn, Marsf, Mgjbot, Dria
 Last updated by: Sheppy,