From f285f850d7037e1bbb76c67c57db5c165fbf07d8 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 13 Jun 2013 08:35:05 +0100 Subject: [PATCH] Use window.onerror instead of window.addEventListener for error trapping Now the error trapping works in Firefox --- boot/boot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index f306d3e6a..a97024162 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -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; - }); + }; } /*