Use window.onerror instead of window.addEventListener for error trapping

Now the error trapping works in Firefox
This commit is contained in:
Jeremy Ruston 2013-06-13 08:35:05 +01:00
parent c631916441
commit f285f850d7
1 changed files with 3 additions and 3 deletions

View File

@ -105,10 +105,10 @@ $tw.utils.error = function(err) {
Use our custom error handler if we're in the browser
*/
if($tw.browser) {
window.addEventListener("error",function(event) {
$tw.utils.error(event.message);
window.onerror = function(errorMsg,url,lineNumber) {
$tw.utils.error(errorMsg);
return false;
});
};
}
/*