Name
ErrorEvent — an uncaught exception from a worker thread
Inherits from
Event
Synopsis
When an uncaught exception occurs in a Worker thread, and the exception is not handled by
the onerror function in the WorkerGlobalScope, that exception causes a
nonbubbling error event to be triggered on the Worker object. The
event has an ErrorEvent object associated with it to provide details
about the exception that occurred. Calling preventDefault() on the ErrorEvent object
(or returning false from the
event handler) will prevent the error from propagating further to
containing threads and may also prevent it from being displayed in
an error console.
Properties
readonly stringfilenameThe URL of the JavaScript file in which the exception was originally thrown.
readonly unsigned longlinenoThe line number within that file at which the exception was thrown.
readonly stringmessageA message describing the exception.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access