このロケールの翻訳が存在しないため、英語バージョンのコンテンツを表示しています。 Help us translate this article!
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 | 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
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ErrorEvent | Chrome Full support 10 | Edge Full support Yes | Firefox Full support Yes | IE Full support Yes | Opera Full support 11 | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support Yes | Opera Android Full support 11 | Safari iOS Full support Yes | Samsung Internet Android ? |
ErrorEvent() constructor | Chrome Full support Yes | Edge ? | Firefox ? | IE ? | Opera Full support Yes | Safari ? | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android ? | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android ? |
colno | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
error | Chrome Full support Yes | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
filename | Chrome Full support 10 | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support 11 | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support Yes | Opera Android Full support 11 | Safari iOS Full support Yes | Samsung Internet Android ? |
lineno | Chrome Full support 10 | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support 11 | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support Yes | Opera Android Full support 11 | Safari iOS Full support Yes | Samsung Internet Android ? |
message | Chrome Full support 10 | Edge Full support 12 | Firefox Full support Yes | IE ? | Opera Full support 11 | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support Yes | Opera Android Full support 11 | Safari iOS Full support Yes | 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
- Using web workers, most likely objects to raise such an event