Skip to main content

Function: openWindow()

function openWindow<Out, In, R>(url, options): OpenedWindow<Out, In, R>;

Open a window (possibly on another origin) and get a typed 1:1 channel to it. The child must call connectToOpener(). Every received message is validated: event.origin, envelope brand, per-connection nonce, and event.source.

Type Parameters

Type ParameterDefault type
Out extends MessageMap-
In extends MessageMap-
Runknown

Parameters

ParameterType
urlstring | URL
optionsOpenWindowOptions

Returns

OpenedWindow<Out, In, R>