Skip to main content

Properties (4)

Property Type Default Required Description
id⚓︎ string x

ID of the window.

isFocused⚓︎ boolean x

Flag indicating whether the window is currently on focus.

name⚓︎ string x

Name of the window.

zoomFactor⚓︎ number x

Retrieves the current zoom factor.

21 Methods

close()⚓︎

() => Promise<WebWindow>

Closes the window

focus()⚓︎

() => Promise<WebWindow>

Attempts to activate and bring to foreground the window. It is possible to fail due to client browser settings.

getBounds()⚓︎

() => Promise<Bounds>

Returns the current location and size of the window.

getChannel()⚓︎

() => Promise<string>

Retrieves the current Channel of the window, if any.

getContext()⚓︎

() => Promise<any>

Gets the current context object of the window.

getTitle()⚓︎

() => Promise<string>

Returns the title of the window.

getURL()⚓︎

() => Promise<string>

Gets the current URL of the window.

moveResize()⚓︎

(dimension: Partial<Bounds>) => Promise<WebWindow>

Sets new location and size for the window. The accepted settings are absolute.

Parameters (1)

Name Type Required Description
dimension⚓︎ Partial<Bounds>

The object containing the desired absolute size and location.

moveTo()⚓︎

(top?: number, left?: number) => Promise<WebWindow>

Sets a new location of the window. The accepted settings are relative.

Parameters (2)

Name Type Required Description
top⚓︎ number x

Relative distance top coordinates.

left⚓︎ number x

Relative distance left coordinates.

onChannelsChanged()⚓︎

(callback: (names: string[]) => void) => UnsubscribeFunction

Notifies when the current Channels of the window have changed. Returns a function you can use to unsubscribe from the event.

Parameters (1)

Name Type Required Description
callback⚓︎ (names: string[]) => void

Callback for handling the event. Receives the names of the current Channels as an argument.

onContextUpdated()⚓︎

(callback: (context: any, window: WebWindow) => void) => UnsubscribeFunction

Notifies when a change to the window's context has been made.

Parameters (1)

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

The function which will be invoked when a change to the window's context happens. The function will be called with the new context and window as arguments.

onFocusChanged()⚓︎

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

Notifies when the window focus is changed.

Parameters (1)

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

Callback function to handle the event. Returns an unsubscribe function.

onZoomFactorChanged()⚓︎

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

Notifies when the zoom factor is changed.

io.Connect Browser 4.1

Parameters (1)

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

Callback function for handling the event.

refresh()⚓︎

() => Promise<WebWindow>

Refreshes the current window.

io.Connect Browser 4.1

resizeTo()⚓︎

(width?: number, height?: number) => Promise<WebWindow>

Sets a new size of the window. The accepted settings are relative.

Parameters (2)

Name Type Required Description
width⚓︎ number x

Relative width of the window.

height⚓︎ number x

Relative height of the window.

setContext()⚓︎

(context: any) => Promise<WebWindow>

Sets new context for the window.

Parameters (1)

Name Type Required Description
context⚓︎ any

The new context object for the window.

setTitle()⚓︎

(title: string) => Promise<WebWindow>

Sets a new title for the window

Parameters (1)

Name Type Required Description
title⚓︎ string

The new title value.

setZoomFactor()⚓︎

(factor: number) => Promise<WebWindow>

Changes the zoom level.

io.Connect Browser 4.1

Parameters (1)

Name Type Required Description
factor⚓︎ number

Zoom factor.

updateContext()⚓︎

(context: any) => Promise<WebWindow>

Updates the context object of the window

Parameters (1)

Name Type Required Description
context⚓︎ any

The new context object for the window.

zoomIn()⚓︎

() => Promise<WebWindow>

Zooms in the window.

io.Connect Browser 4.1

zoomOut()⚓︎

() => Promise<WebWindow>

Zooms out the window.

io.Connect Browser 4.1