mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 01:57:19 +00:00
Use window.onerror instead of window.addEventListener for error trapping
Now the error trapping works in Firefox
This commit is contained in:
parent
c631916441
commit
f285f850d7
@ -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;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user