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

Specification Status Comment
HTML Living Standard
The definition of 'ErrorEvent' in that specification.
Living Standard Added the error property and the 5th parameter to the constructor.
HTML5
The definition of 'ErrorEvent' in that specification.
Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 10Edge Full support YesFirefox Full support YesIE Full support YesOpera Full support 11Safari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support 11Safari iOS Full support YesSamsung Internet Android ?
ErrorEvent() constructorChrome Full support YesEdge ? Firefox ? IE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
colnoChrome Full support YesEdge ? Firefox ? IE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
error
Experimental
Chrome Full support YesEdge ? Firefox ? IE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
filenameChrome Full support 10Edge ? Firefox ? IE ? Opera Full support 11Safari ? WebView Android Full support YesChrome Android Full support 18Edge Mobile ? Firefox Android ? Opera Android Full support 11Safari iOS ? Samsung Internet Android ?
linenoChrome Full support 10Edge ? Firefox ? IE ? Opera Full support 11Safari ? WebView Android Full support YesChrome Android Full support 18Edge Mobile ? Firefox Android ? Opera Android Full support 11Safari iOS ? Samsung Internet Android ?
messageChrome Full support 10Edge ? Firefox ? IE ? Opera Full support 11Safari ? WebView Android Full support YesChrome Android Full support 18Edge Mobile ? Firefox Android ? Opera Android Full support 11Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

See also

Document Tags and Contributors

Tags: 
Contributors to this page: connorshea, AndySky21, arronei, klebba, erikadoyle, fscholz, agentme, teoli
Last updated by: connorshea,