| Parameter | Details |
|---|---|
| eventOrMessage | Some browsers will call the event handler with just one argument, an Event object. However, other browsers, especially the older ones and older mobile ones will supply a String message as a first argument. |
| url | If a handler is called with more than 1 argument, the second argument usually is an URL of a JavaScript file that is the source of the problem. |
| lineNumber | If a handler is called with more than 1 argument, the third argument is a line number inside the JavaScript source file. |
| colNumber | If a handler is called with more than 1 argument, the fourth argument is the column number inside the JavaScript source file. |
| error | If a handler is called with more than 1 argument, the fifth argument is sometimes an Error object describing the problem. |
Unfortunately, window.onerror has historically been implemented differently by each vendor. The information provided in the Parameters section is an approximation of what to expect across different browsers and their versions.