mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-06 01:02:17 -08: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
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue