An event handler for error events sent to the window.
Syntaxwindow.onerror = funcRef
funcRef is a reference to a function.
The error event is raised when an error occurs in the script. The example above prevents error dialogs from displaying-which is the window's normal behavior-by overriding the default event handler for error events that go to the window.
SpecificationDOM Level 0. Not part of specification.