onWindowEvents([callback], [remove])
Class: Window.
Description:
Gets, registers or unregisters an event handler for window events, such as activate, deactivate, closed, etc.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
function |
The event handler function receiving WindowEvent 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, // `activate`, `deactivate`, `minimize`, `restore`, `closing`, `close`, `show`
interactive: boolean // Indicates if triggered by user's interaction with window
};
