state([state])

Class: Window.

Description:

Sets or get a window state. Use one of these enum values: Window.State.[Normal|Minimized|Maximized|MaximizedHorizontally|MaximizedVertically]

Parameters:

Name Type Description

[state]

Window.State

Setting new window state

Returns:

Returns this Window if argument is provided, otherwise returns current state.

Type: Window.State | Window

Examples:

window.state(Window.State.Maximized);
if(window.state() === Window.State.Maximized) console.log("It works!");

Also See: