Interface AbstractWorker
interface AbstractWorker {
onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
addEventListener<K extends "error">(
type: K,
listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
removeEventListener<K extends "error">(
type: K,
listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
}
onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
addEventListener<K extends "error">(
type: K,
listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
removeEventListener<K extends "error">(
type: K,
listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
}
Hierarchy
- AbstractWorker (View Summary)
Index
Properties
Methods
Methods
addEventListener
- addEventListener<K extends "error">(
type: K,
listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void Type Parameters
Parameters
- type: K
- listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[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
removeEventListener
- removeEventListener<K extends "error">(
type: K,
listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void Type Parameters
Parameters
- type: K
- listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any
Optional
options: boolean | EventListenerOptions
Returns void
- removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optional
options: boolean | EventListenerOptions
Returns void
MDN Reference