This translation is incomplete. Please help translate this article from English.
ErrorEvent 介面是用來提供程式碼或是檔案的錯誤訊息的事件。
Properties
此介面繼承了其父 Event 的 properties 。
ErrorEvent.messageRead only- 一
DOMString提供具可讀性的關於問題的錯誤訊息。 ErrorEvent.filenameRead only- 一
DOMString,為發生錯誤的程式碼檔案的檔名。 ErrorEvent.linenoRead only- 一
整數,為發生問題的程式的行數。 ErrorEvent.colnoRead only- 一
整數,為發生問題的程式的欄數。 ErrorEvent.errorRead only- Is a JavaScript
Objectthat is concerned by the event.
Constructor
ErrorEvent()- 建立一
ErrorEvent事件,其包含提供的參數。
Methods
此介面繼承了其父 Event 的 methods。
Specifications
| Specification | Status | Comment |
|---|---|---|
| WHATWG HTML Living Standard The definition of 'ErrorEvent' in that specification. |
Living Standard | Added the error propriety and the 5th parameter to the constructor. |
| HTML5 The definition of 'ErrorEvent' in that specification. |
Recommendation | Initial definition. |
瀏覽器支援度比較
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | ? | (Yes) | (Yes) |
colno property and 4th argument to constructor |
(Yes) | (Yes) | ? | ? | ? |
error property and 5th argument to constructor |
(Yes) | (Yes) | Not supported | Not supported | Not supported |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | ? | (Yes) | (Yes) |
colno property and 4th argument to constructor |
? | Not supported | ? | ? | ? |
error property and 5th argument to constructor |
Not supported | Not supported | Not supported | Not supported | Not supported |
延伸閱讀
- Using web workers, most likely objects to raise such an event

