« XUL Reference home
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):