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