Methods
(async, static) wrap(identity) → {Promise.<ExternalWindow>}
Asynchronously returns an external window object that represents
an existing external window.
Note: This method is restricted by default and must be enabled via
API security settings.
Parameters:
Name | Type | Description |
---|---|---|
identity |
ExternalWindowIdentity |
- Tutorials:
Returns:
- Type
- Promise.<ExternalWindow>
(async) bringToFront() → {Promise.<void>}
Brings the external window to the front of the window stack.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) close() → {Promise.<void>}
Closes the external window.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) flash() → {Promise.<void>}
Flashes the external window’s frame and taskbar icon until stopFlashing is called.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) focus() → {Promise.<void>}
Gives focus to the external window.
- Tutorials:
Fires:
- ExternalWindow#event:focused
Returns:
- Type
- Promise.<void>
(async) getBounds() → {Promise.<Bounds>}
Gets the current bounds (top, left, etc.) of the external window.
- Tutorials:
Returns:
- Type
- Promise.<Bounds>
(async) getGroup() → {Promise.<Array.<(ExternalWindow|_Window)>>}
Retrieves an array containing wrapped external windows that are grouped with this external window. If a window is not in a group an empty array is returned.
- Tutorials:
Returns:
- Type
- Promise.<Array.<(ExternalWindow|_Window)>>
(async) getInfo() → {Promise.<any>}
Gets an information object for the window.
- Tutorials:
Returns:
- Type
- Promise.<any>
(async) getOptions() → {Promise.<any>}
Gets an external window's options.
- Tutorials:
Returns:
- Type
- Promise.<any>
(async) getState() → {Promise.<string>}
Gets the current state ("minimized", "maximized", or "restored") of the external window.
- Tutorials:
Returns:
- Type
- Promise.<string>
(async) hide() → {Promise.<void>}
Hides the external window.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) isShowing() → {Promise.<boolean>}
Determines if the external window is currently showing.
- Tutorials:
Returns:
- Type
- Promise.<boolean>
(async) joinGroup(target) → {Promise.<void>}
Joins the same window group as the specified window. Currently unsupported (method will nack).
Parameters:
Name | Type | Description |
---|---|---|
target |
_Window | ExternalWindow | The window whose group is to be joined |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) leaveGroup() → {Promise.<void>}
Leaves the current window group so that the window can be moved independently of those in the group.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) maximize() → {Promise.<void>}
Maximizes the external window.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) mergeGroups(target) → {Promise.<void>}
Merges the instance's window group with the same window group as the specified window
Parameters:
Name | Type | Description |
---|---|---|
target |
_Window | ExternalWindow | The window whose group is to be merged with |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) minimize() → {Promise.<void>}
Minimizes the external window.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) moveBy(deltaLeft, deltaTop) → {Promise.<void>}
Moves the external window by a specified amount.
Parameters:
Name | Type | Description |
---|---|---|
deltaLeft |
number | The change in the left position of the window |
deltaTop |
number | The change in the top position of the window |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) moveTo(left, top) → {Promise.<void>}
Moves the external window to a specified location.
Parameters:
Name | Type | Description |
---|---|---|
left |
number | The left position of the window |
top |
number | The top position of the window |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) resizeBy(deltaWidth, deltaHeight, anchor) → {Promise.<void>}
Resizes the external window by a specified amount.
Parameters:
Name | Type | Description |
---|---|---|
deltaWidth |
number | The change in the width of the window |
deltaHeight |
number | The change in the height of the window |
anchor |
AnchorType | Specifies a corner to remain fixed during the resize. Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". If undefined, the default is "top-left". |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) resizeTo(width, height, anchor) → {Promise.<void>}
Resizes the external window to the specified dimensions.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The change in the width of the window |
height |
number | The change in the height of the window |
anchor |
AnchorType | Specifies a corner to remain fixed during the resize. Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". If undefined, the default is "top-left". |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) restore() → {Promise.<void>}
Restores the external window to its normal state (i.e. unminimized, unmaximized).
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) setAsForeground() → {Promise.<void>}
Will bring the external window to the front of the entire stack and give it focus.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) setBounds() → {Promise.<void>}
Sets the external window's size and position.
Properties:
Name | Type | Description |
---|---|---|
bounds |
Bounds |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) show() → {Promise.<void>}
Shows the external window if it is hidden.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) showAt(left, top) → {Promise.<void>}
Shows the external window, if it is hidden, at the specified location. If the toggle parameter is set to true, the external window will alternate between showing and hiding.
Parameters:
Name | Type | Description |
---|---|---|
left |
number | The left position of the window |
top |
number | The top position of the window |
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) stopFlashing() → {Promise.<void>}
Stops the taskbar icon from flashing.
- Tutorials:
Returns:
- Type
- Promise.<void>
(async) updateOptions(options) → {Promise.<void>}
Updates the external window using the passed options
Parameters:
Name | Type | Description |
---|---|---|
options |
* | Changes an external window's options |
- Tutorials:
Returns:
- Type
- Promise.<void>