Constructor
new Window()
Methods
(static) create(options) → {Promise.<_Window>}
Creates a new Window.
Parameters:
Name | Type | Description |
---|---|---|
options |
* | Window creation options |
- Tutorials:
Returns:
- Type
- Promise.<_Window>
(static) getCurrent() → {Promise.<_Window>}
Asynchronously returns a Window object that represents the current window
- Tutorials:
Returns:
- Type
- Promise.<_Window>
(static) getCurrentSync() → {_Window}
Synchronously returns a Window object that represents the current window
- Tutorials:
Returns:
- Type
- _Window
(async, static) wrap(identity) → {Promise.<_Window>}
Asynchronously returns a Window object that represents an existing window.
Parameters:
Name | Type | Description |
---|---|---|
identity |
Identity |
- Tutorials:
Returns:
- Type
- Promise.<_Window>
(static) wrapSync(identity) → {_Window}
Synchronously returns a Window object that represents an existing window.
Parameters:
Name | Type | Description |
---|---|---|
identity |
Identity |
- Tutorials:
Returns:
- Type
- _Window
animate(transitions, options) → {Promise.<void>}
Performs the specified window transitions.
Parameters:
Name | Type | Description |
---|---|---|
transitions |
Transition | Describes the animations to perform. See the tutorial. |
options |
TransitionOptions | Options for the animation. See the tutorial. |
- Tutorials:
Returns:
- Type
- Promise.<void>
authenticate(userName, password) → {Promise.<void>}
Provides credentials to authentication requests
Parameters:
Name | Type | Description |
---|---|---|
userName |
string | userName to provide to the authentication challange |
password |
string | password to provide to the authentication challange |
- Tutorials:
Returns:
- Type
- Promise.<void>
blur() → {Promise.<void>}
Removes focus from the window.
- Tutorials:
Returns:
- Type
- Promise.<void>
bringToFront() → {Promise.<void>}
Brings the window to the front of the window stack.
- Tutorials:
Returns:
- Type
- Promise.<void>
close(forceopt) → {Promise.<void>}
closes the window application
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
force |
boolean |
<optional> |
false | Close will be prevented from closing when force is false and ‘close-requested’ has been subscribed to for application’s main window. |
- Tutorials:
Returns:
- Type
- Promise.<void>
disableFrame() → {Promise.<void>}
Prevents a user from changing a window's size/position when using the window's frame.
- Tutorials:
Returns:
- Type
- Promise.<void>
enableFrame() → {Promise.<void>}
Re-enables user changes to a window's size/position when using the window's frame.
- Tutorials:
Returns:
- Type
- Promise.<void>
executeJavaScript(code) → {Promise.<void>}
Executes Javascript on the window, restricted to windows you own or windows owned by applications you have created.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | JavaScript code to be executed on the window. |
- Tutorials:
Returns:
- Type
- Promise.<void>
flash() → {Promise.<void>}
Flashes the window’s frame and taskbar icon until stopFlashing is called.
- Tutorials:
Returns:
- Type
- Promise.<void>
focus() → {Promise.<void>}
Gives focus to the window.
- Tutorials:
Fires:
- _Window#event:focused
Returns:
- Type
- Promise.<void>
getAllFrames() → {Promise.<Array.<FrameInfo>>}
Retrieves an array of frame info objects representing the main frame and any iframes that are currently on the page.
- Tutorials:
Returns:
- Type
- Promise.<Array.<FrameInfo>>
getBounds() → {Promise.<Bounds>}
Gets the current bounds (top, left, width, height) of the window.
- Tutorials:
Returns:
- Type
- Promise.<Bounds>
getGroup() → {Promise.<Array.<_Window>>}
Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. Please note that calling window is included in the result array.
- Tutorials:
Returns:
- Type
- Promise.<Array.<_Window>>
getInfo() → {Promise.<WindowInfo>}
Gets an information object for the window.
- Tutorials:
Returns:
- Type
- Promise.<WindowInfo>
getNativeId() → {Promise.<string>}
Returns then running applications uuid
- Tutorials:
Returns:
- Type
- Promise.<string>
getNativeWindow() → {Promise.<any>}
Returns the native JavaScript "window" object for the window.
- Tutorials:
Returns:
- Type
- Promise.<any>
getOptions() → {Promise.<any>}
Gets the current settings of the window.
- Tutorials:
Returns:
- Type
- Promise.<any>
getParentApplication() → {Promise.<Application>}
Gets the parent application.
- Tutorials:
Returns:
- Type
- Promise.<Application>
getParentWindow() → {Promise.<_Window>}
Gets the parent window.
- Tutorials:
Returns:
- Type
- Promise.<_Window>
(async) getSnapshot(areaopt) → {Promise.<string>}
Gets a base64 encoded PNG snapshot of the window or just part a of it.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
area |
Area |
<optional> |
The area of the window to be captured. Omitting it will capture the whole visible window. |
- Tutorials:
Returns:
- Type
- Promise.<string>
getState() → {Promise.<string>}
Gets the current state ("minimized", "maximized", or "restored") of the window.
- Tutorials:
Returns:
- Type
- Promise.<string>
getZoomLevel() → {Promise.<number>}
Returns the zoom level of the window.
- Tutorials:
Returns:
- Type
- Promise.<number>
hide() → {Promise.<void>}
Hides the window.
- Tutorials:
Returns:
- Type
- Promise.<void>
isShowing() → {Promise.<boolean>}
Determines if the window is currently showing.
- Tutorials:
Returns:
- Type
- Promise.<boolean>
joinGroup(target) → {Promise.<void>}
Joins the same window group as the specified window.
Parameters:
Name | Type | Description |
---|---|---|
target |
class | The window whose group is to be joined |
- Tutorials:
Returns:
- Type
- Promise.<void>
leaveGroup() → {Promise.<void>}
Leaves the current window group so that the window can be move independently of those in the group.
- Tutorials:
Returns:
- Type
- Promise.<void>
maximize() → {Promise.<void>}
Maximizes the window
- Tutorials:
Returns:
- Type
- Promise.<void>
mergeGroups(target) → {Promise.<void>}
Merges the instance's window group with the same window group as the specified window
Parameters:
Name | Type | Description |
---|---|---|
target |
class | The window whose group is to be merged with |
- Tutorials:
Returns:
- Type
- Promise.<void>
minimize() → {Promise.<void>}
Minimizes the window.
- Tutorials:
Returns:
- Type
- Promise.<void>
moveBy(deltaLeft, deltaTop) → {Promise.<void>}
Moves the 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>
moveTo(left, top) → {Promise.<void>}
Moves the 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>
navigate(url) → {Promise.<void>}
Navigates the window to a specified URL.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL to navigate the window to. |
- Tutorials:
Returns:
- Type
- Promise.<void>
navigateBack() → {Promise.<void>}
Navigates the window back one page.
- Tutorials:
Returns:
- Type
- Promise.<void>
reload() → {Promise.<void>}
Reloads the window current page
- Tutorials:
Returns:
- Type
- Promise.<void>
resizeBy(deltaWidth, deltaHeight, anchor) → {Promise.<void>}
Resizes the 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 |
string | 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>
resizeTo(width, height, anchor) → {Promise.<void>}
Resizes the 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 |
string | 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>
restore() → {Promise.<void>}
Restores the window to its normal state (i.e., unminimized, unmaximized).
- Tutorials:
Returns:
- Type
- Promise.<void>
setAsForeground() → {Promise.<void>}
Will bring the window to the front of the entire stack and give it focus.
- Tutorials:
Returns:
- Type
- Promise.<void>
setBounds() → {Promise.<void>}
Sets the window's size and position.
Properties:
Name | Type | Description |
---|---|---|
bounds |
Bounds | This is a * @type {string} name - name of the window.object that holds the propertys of |
- Tutorials:
Returns:
- Type
- Promise.<void>
setZoomLevel(level) → {Promise.<void>}
Sets the zoom level of the window.
Parameters:
Name | Type | Description |
---|---|---|
level |
number | The zoom level |
- Tutorials:
Returns:
- Type
- Promise.<void>
show(forceopt) → {Promise.<void>}
Shows the window if it is hidden.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
force |
boolean |
<optional> |
false | Show will be prevented from showing when force is false and ‘show-requested’ has been subscribed to for application’s main window. |
- Tutorials:
Returns:
- Type
- Promise.<void>
showAt(left, top, force) → {Promise.<void>}
Shows the window if it is hidden at the specified location. If the toggle parameter is set to true, the window will alternate between showing and hiding.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
left |
number | The left position of the window |
|
top |
number | The right position of the window |
|
force |
boolean | false | Show will be prevented from closing when force is false and ‘show-requested’ has been subscribed to for application’s main window |
- Tutorials:
Returns:
- Type
- Promise.<void>
showDeveloperTools() → {Promise.<void>}
Shows the Chromium Developer Tools
- Tutorials:
Returns:
- Type
- Promise.<void>
stopFlashing() → {Promise.<void>}
Stops the taskbar icon from flashing.
- Tutorials:
Returns:
- Type
- Promise.<void>
stopNavigation() → {Promise.<void>}
Stops any current navigation the window is performing.
- Tutorials:
Returns:
- Type
- Promise.<void>
updateOptions(options) → {Promise.<void>}
Updates the window using the passed options
Parameters:
Name | Type | Description |
---|---|---|
options |
* | Changes a window's options that were defined upon creation. See tutorial |
- Tutorials:
Returns:
- Type
- Promise.<void>