Skip to main content
Window.addEventListener - Platform - Web documentation
method Window.addEventListener
Private
Window.addEventListener<K extends keyof WindowEventMap>(
type: K,
listener: (
this: Window,
) => any
,
options?: boolean | AddEventListenerOptions,
): void

Type Parameters

K extends keyof WindowEventMap

Parameters

type: K
listener: (
this: Window,
) => any
optional
options: boolean | AddEventListenerOptions

Return Type

void
Window.addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void

Parameters

type: string
optional
options: boolean | AddEventListenerOptions

Return Type

void