The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.
The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).
MDN
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.
Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().
MDN
The AbstractWorker.onerror property represents an EventHandler, that is a function to be called when the error event occurs and bubbles through the Worker.
The AbstractWorker.onerror property represents an EventHandler, that is a function to be called when the error event occurs and bubbles through the Worker.
MDN
Removes the event listener previously registered with EventTarget.addEventListener.
Removes the event listener previously registered with EventTarget.addEventListener.
MDN
The AbstractWorker interface abstracts properties and methods common to all kind of workers, being Worker or SharedWorker.
MDN