classWORKER
EventTarget
js/worker.js:787
EventTarget()
Base event target used by Worker objects, Worker global scopes and BroadcastChannel objects.
EventTarget()
Base event target used by Worker objects, Worker global scopes and BroadcastChannel objects.
addEventListener(type, callback, options)
Registers an event listener.
| Name | Type | Description |
|---|---|---|
type | string | |
callback | (function|Object) | Function or object with a handleEvent() method. |
optionsoptional | (boolean|Object) |
dispatchEvent(event)
Dispatches an event to registered listeners.
| Name | Type | Description |
|---|---|---|
event | Event |
boolean — false when a cancelable event was canceled, otherwise true.
removeEventListener(type, callback, options)
Removes a matching event listener.
| Name | Type | Description |
|---|---|---|
type | string | |
callback | (function|Object) | |
optionsoptional | (boolean|Object) |