onStateChange([callback], [remove])
Class: Window.
Description:
Gets, registers or unregisters an event handler for when the state of the Window changes between normal, minimized, maximized.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
function |
The event handler function receiving WindowStateEvent event object. |
|
|
|
boolean |
false |
Set to |
Returns:
Type: this
Examples:
// Example event object:
const e = {
target: Window, // The component that triggered the event.
type: string, // `change`
fromState: Window.State, // Previous state
toState: Window.State, // New state
interactive: boolean // Indicates if the state was changed by user's interaction with window
};
