Worker.addEventListener - Web documentation
method Worker.addEventListener
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