ErrorEvent
Note: This feature is available inWeb Workers.
TheErrorEvent interface represents events providing information related to errors in scripts or in files.
In this article
Constructor
ErrorEvent()Creates an
ErrorEventevent with the given parameters.
Instance properties
Also inherits properties from its parentEvent.
ErrorEvent.messageRead onlyA string containing a human-readable error message describing the problem.
ErrorEvent.filenameRead onlyA string containing the name of the script file in which the error occurred.
ErrorEvent.linenoRead onlyAn integer containing the line number of the script file on which the error occurred.
ErrorEvent.colnoRead onlyAn integer containing the column number of the script file on which the error occurred.
ErrorEvent.errorRead onlyA JavaScript value, such as an
ErrororDOMException, representing the error associated with this event.
Instance methods
Inherits methods from its parentEvent.
Specifications
| Specification |
|---|
| HTML> # errorevent> |
Browser compatibility
See also
- Using web workers, most likely objects to raise such an event.
Window:erroreventNavigation:navigateerrorevent