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.message Read only

Is a DOMString containing a human-readable error message describing the problem.

ErrorEvent.filename Read only

Is a DOMString containing the name of the script file in which the error occurred.

ErrorEvent.lineno Read only

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

ErrorEvent.colno Read only

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

ErrorEvent.error Read only

Is a JavaScript Object that is concerned by the event.

Constructor

ErrorEvent()

Creates an ErrorEvent event with the given parameters.

Methods

Inherits methods from its parent Event.

Specifications

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

© 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