For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Interface ActorTarget
addEventListener: {
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
} & {
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
};
postMessage: {
(message: any, targetOrigin: string, transfer?: Transferable[]): void;
(message: any, options?: WindowPostMessageOptions): void;
} & {
(message: any, targetOrigin: string, transfer?: Transferable[]): void;
(message: any, options?: WindowPostMessageOptions): void;
};
removeEventListener: {
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
} & {
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
};
terminate?: () => void;
}
Properties
addEventListener
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
} & {
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
}
Type Declaration
-
- <K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void -
Type Parameters
- K extends keyof WindowEventMap
Parameters
- type: K
- listener: (this: Window, ev: WindowEventMap[K]) => any
Optionaloptions: boolean | AddEventListenerOptions
Returns void
- (
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void -
The
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | AddEventListenerOptions
Returns void
- <K extends keyof WindowEventMap>(
-
- <K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void -
Type Parameters
- K extends keyof WindowEventMap
Parameters
- type: K
- listener: (this: Window, ev: WindowEventMap[K]) => any
Optionaloptions: boolean | AddEventListenerOptions
Returns void
- (
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void -
Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | AddEventListenerOptions
Returns void
- <K extends keyof WindowEventMap>(
postMessage
(message: any, targetOrigin: string, transfer?: Transferable[]): void;
(message: any, options?: WindowPostMessageOptions): void;
} & {
(message: any, targetOrigin: string, transfer?: Transferable[]): void;
(message: any, options?: WindowPostMessageOptions): void;
}
Type Declaration
-
- (message: any, targetOrigin: string, transfer?: Transferable[]): void
-
The
window.postMessage()method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.Parameters
- message: any
- targetOrigin: string
Optionaltransfer: Transferable[]
Returns void
- (message: any, options?: WindowPostMessageOptions): void
-
Parameters
- message: any
Optionaloptions: WindowPostMessageOptions
Returns void
-
- (message: any, targetOrigin: string, transfer?: Transferable[]): void
-
The
window.postMessage()method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.Parameters
- message: any
- targetOrigin: string
Optionaltransfer: Transferable[]
Returns void
- (message: any, options?: WindowPostMessageOptions): void
-
The
window.postMessage()method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.Parameters
- message: any
Optionaloptions: WindowPostMessageOptions
Returns void
removeEventListener
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
} & {
<K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
}
Type Declaration
-
- <K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void -
The
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.Type Parameters
- K extends keyof WindowEventMap
Parameters
- type: K
- listener: (this: Window, ev: WindowEventMap[K]) => any
Optionaloptions: boolean | EventListenerOptions
Returns void
- (
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void -
The
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | EventListenerOptions
Returns void
- <K extends keyof WindowEventMap>(
-
- <K extends keyof WindowEventMap>(
type: K,
listener: (this: Window, ev: WindowEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void -
Type Parameters
- K extends keyof WindowEventMap
Parameters
- type: K
- listener: (this: Window, ev: WindowEventMap[K]) => any
Optionaloptions: boolean | EventListenerOptions
Returns void
- (
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void -
Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | EventListenerOptions
Returns void
- <K extends keyof WindowEventMap>(
The
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.MDN Reference