Skip to main content
Access via:io.windows

8 Methods

findById()⚓︎

(id: string) => WebWindow | undefined

Finds a window by ID.

Parameters (1)

Name Type Required Description
id⚓︎ string

Window ID.

list()⚓︎

() => WebWindow[]

my()⚓︎

() => WebWindow

Returns the current window.

onWindowAdded()⚓︎

(callback: (window: WebWindow) => void) => UnsubscribeFunction

Notifies when a new window is opened.

Parameters (1)

Name Type Required Description
callback⚓︎ (window: WebWindow) => void

Callback function to handle the event. Receives the added window as a parameter. Returns an unsubscribe function.

onWindowGotFocus()⚓︎

(callback: (window: WebWindow) => void) => UnsubscribeFunction

Notifies when a window receives focus.

Parameters (1)

Name Type Required Description
callback⚓︎ (window: WebWindow) => void

Callback function to handle the event. Receives the window instance as a parameter. Returns an unsubscribe function.

onWindowLostFocus()⚓︎

(callback: (window: WebWindow) => void) => UnsubscribeFunction

Notifies when a window loses focus.

Parameters (1)

Name Type Required Description
callback⚓︎ (window: WebWindow) => void

Callback function to handle the event. Receives the window instance as a parameter. Returns an unsubscribe function.

onWindowRemoved()⚓︎

(callback: (window: WebWindow) => void) => UnsubscribeFunction

Notifies when a window is closed. For backwards compatibility, you can also use windowRemoved.

Parameters (1)

Name Type Required Description
callback⚓︎ (window: WebWindow) => void

Callback function to handle the event. Receives the removed window as a parameter. Returns an unsubscribe function.

open()⚓︎

(name: string, url: string, options?: Settings) => Promise<WebWindow>

Opens a new IO Connect Browser Window.

Parameters (3)

Name Type Required Description
name⚓︎ string

The name for the window

url⚓︎ string

The window URL.

options⚓︎ Settings x

Options for creating a window.