1
0
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:
Jeremy Ruston 2013-06-13 08:35:05 +01:00
parent c631916441
commit f285f850d7

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;
});
};
}
/*