Note: This feature is available in Web Workers.
The ErrorEvent interface represents events providing information related to errors in scripts or in files.
ErrorEvent()Creates an ErrorEvent event with the given parameters.
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.
Inherits methods from its parent Event.
| Specification |
|---|
| HTML> # errorevent> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
ErrorEvent |
16 | 14 | 27 | 15 | 6 | 18 | 27 | 14 | 6 | 1.0 | 4.4 | 6 |
ErrorEvent |
10 | 12 | 27 | 11 | 6 | 18 | 27 | 11 | 6 | 1.0 | 4.4 | 6 |
colno |
30 | 12 | 31 | 17 | 8 | 30 | 31 | 18 | 8 | 2.0 | 4.4 | 8 |
error |
30 | 12 | 31 | 17 | 10 | 30 | 31 | 18 | 10 | 2.0 | 4.4 | 10 |
filename |
10 | 12 | 27 | 11 | 6 | 18 | 27 | 11 | 6 | 1.0 | 4.4 | 6 |
lineno |
10 | 12 | 27 | 11 | 6 | 18 | 27 | 11 | 6 | 1.0 | 4.4 | 6 |
message |
10 | 12 | 27 | 11 | 6 | 18 | 27 | 11 | 6 | 1.0 | 4.4 | 6 |
Window: error eventNavigation: navigateerror event
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent