error

Test page.

Events overview page.

The error event fires when the browser encounters a JavaScript error or when an image file does not exist.

Event IE 5.5 IE 6 IE 7 IE8b1 FF 2 FF 3b5 Saf 3.0 Win Saf 3.1 Win Opera 9.26 Opera 9.5b Konqueror 3.5.7
On the window
Incomplete Incomplete No No No

When the browser encounters a JavaScript error it should fire the error event from the window.

  • IE and Firefox give the event type undefined in the traditional event handler registration. Also, the event fires on the link that contains the faulty code, and not on the window.
On the document
No No No Yes Yes

Is the error event available on the document?

On an image
Yes Yes Yes Yes Yes

When an image file does not exist the error event should fire.

Event bubbling

The spec says this event should bubble, but most browsers disagree.

No No Untestable Yes No
Event IE 5.5 IE 6 IE 7 IE8b1 FF 2 FF 3b5 Saf 3.0 Win Saf 3.1 Win Opera 9.26 Opera 9.5b Konqueror 3.5.7