OpenedWindow
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Out extends MessageMap |
In extends MessageMap |
R |
Properties
Section titled “Properties”closed
Section titled “closed”readonly closed: Promise<void>;Resolves when the child window is gone (with or without a result).
readonly ready: Promise<void>;Resolves once the child completes the ready handshake.
result
Section titled “result”readonly result: Promise<R>;The child’s finish() value. Rejects WindowClosedError / HandshakeTimeoutError.
window
Section titled “window”readonly window: | WindowLike | null;The opened window, or null if the popup was blocked.
Methods
Section titled “Methods”close()
Section titled “close()”close(): void;Close the child window.
Returns
Section titled “Returns”void
on<K>(type, handler): () => void;Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
K extends string |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | K |
handler | (payload) => void |
Returns
Section titled “Returns”() => void
post()
Section titled “post()”post<K>(type, payload): void;Queued until the handshake completes — nothing is dropped while the child loads.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
K extends string |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | K |
payload | Out[K] |
Returns
Section titled “Returns”void