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

Type Parameters

K extends keyof WorkerEventMap

Parameters

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

Return Type

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

Parameters

type: string
optional
options: boolean | AddEventListenerOptions

Return Type

void
Back to top