window.onerror = function (eventOrMessage, url, lineNumber, colNumber, error) { ... }
ParameterDetailseventOrMessageSome 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...