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

Now the error trapping works in Firefox
print-window-tiddler
Jeremy Ruston 2013-06-13 08:35:05 +01:00
rodzic c631916441
commit f285f850d7
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

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