Function addEventListener
- addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(
type: K,
listener: (
this: DedicatedWorkerGlobalScope,
ev: DedicatedWorkerGlobalScopeEventMap[K],
) => any,
options?: boolean | AddEventListenerOptions,
): void Type Parameters
- K extends keyof DedicatedWorkerGlobalScopeEventMap
Parameters
- type: K
- listener: (
this: DedicatedWorkerGlobalScope,
ev: DedicatedWorkerGlobalScopeEventMap[K],
) => any Optional
options: boolean | AddEventListenerOptions
Returns void
- addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optional
options: boolean | AddEventListenerOptions
Returns void