Skip to main content

Interface: UseOpenedWindow<Out, In, R>

Type Parameters

Type Parameter
Out extends MessageMap
In extends MessageMap
R

Properties

close

close: () => void;

Returns

void


error

error: unknown;

open

open: () => void;

Call from a click handler (popup blockers require a user gesture).

Returns

void


post

post: <K>(type, payload) => void;

Post to the child; no-op while nothing is open.

Queued until the handshake completes — nothing is dropped while the child loads.

Type Parameters

Type Parameter
K extends string

Parameters

ParameterType
typeK
payloadOut[K]

Returns

void


result

result: R | undefined;

The child's finish() value, once status is 'done'.


status

status: OpenedWindowStatus;