ErrorEvent

Note: This feature is available in Web Workers.

The ErrorEvent interface represents events providing information related to errors in scripts or in files.

Event ErrorEvent

Constructor

ErrorEvent()

Creates an ErrorEvent event with the given parameters.

Instance properties

Also inherits properties from its parent Event.

ErrorEvent.message Read only

A string containing a human-readable error message describing the problem.

ErrorEvent.filename Read only

A string containing the name of the script file in which the error occurred.

ErrorEvent.lineno Read only

An integer containing the line number of the script file on which the error occurred.

ErrorEvent.colno Read only

An integer containing the column number of the script file on which the error occurred.

ErrorEvent.error Read only

A JavaScript value, such as an Error or DOMException, representing the error associated with this event.

Instance methods

Inherits methods from its parent Event.

Specifications

Specification
HTML
# the-errorevent-interface

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
ErrorEvent
ErrorEvent() constructor
colno
error
filename
lineno
message

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

See also