ErrorEvent
The ErrorEvent interface represents events providing information related to errors in scripts or in files.
Properties
Also inherits properties from its parent Event.
-
ErrorEvent.messageRead only -
Is a
DOMStringcontaining a human-readable error message describing the problem. -
ErrorEvent.filenameRead only -
Is a
DOMStringcontaining the name of the script file in which the error occurred. -
ErrorEvent.linenoRead only -
Is an
integercontaining the line number of the script file on which the error occurred. -
ErrorEvent.colnoRead only -
Is an
integercontaining the column number of the script file on which the error occurred. -
ErrorEvent.errorRead only -
Is a JavaScript
Objectthat is concerned by the event.
Constructor
ErrorEvent()-
Creates an
ErrorEventevent with the given parameters.
Methods
Inherits methods from its parent Event.
Specifications
| Specification |
|---|
| HTML Standard (HTML) # the-errorevent-interface |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ErrorEvent |
10 |
12 |
30 |
10 |
11 |
6 |
≤37 |
18 |
30 |
11 |
6 |
1.0 |
ErrorEvent |
16 |
14 |
30 |
No |
15 |
6 |
≤37 |
18 |
30 |
14 |
6 |
1.0 |
colno |
30 |
12 |
31 |
10 |
17 |
8 |
4.4 |
30 |
31 |
18 |
8 |
2.0 |
error |
30 |
12 |
31 |
11 |
17 |
10 |
4.4 |
30 |
31 |
18 |
10 |
2.0 |
filename |
10 |
12 |
30 |
10 |
11 |
6 |
≤37 |
18 |
30 |
11 |
6 |
1.0 |
lineno |
10 |
12 |
30 |
10 |
11 |
6 |
≤37 |
18 |
30 |
11 |
6 |
1.0 |
message |
10 |
12 |
30 |
10 |
11 |
6 |
≤37 |
18 |
30 |
11 |
6 |
1.0 |
See also
- Using web workers, most likely objects to raise such an event
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent