W3cubDocs

/Web APIs

ErrorEvent

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

Event ErrorEvent

Instance properties

Also inherits properties from its parent Event.

ErrorEvent.message Read only

A string containing a human-readable error message describing the problem. Lacking a crossorigin setting reduces error logging.

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 Object that is concerned by the event.

Constructor

ErrorEvent()

Creates an ErrorEvent event with the given parameters.

Instance 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 16 14 27 No 15 6 4.4 18 27 14 6 1.0
ErrorEvent 10 12 27 10 11 6 4.4 18 27 11 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 27 10 11 6 4.4 18 27 11 6 1.0
lineno 10 12 27 10 11 6 4.4 18 27 11 6 1.0
message 10 12 27 10 11 6 4.4 18 27 11 6 1.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent