You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by ss...@apache.org on 2012/05/27 15:47:40 UTC
svn commit: r1343049 -
/shindig/trunk/features/src/main/javascript/features/core.util.onload/onload.js
Author: ssievers
Date: Sun May 27 13:47:40 2012
New Revision: 1343049
URL: http://svn.apache.org/viewvc?rev=1343049&view=rev
Log:
SHINDIG-1784 | onload handler doesn't handle errors gracefully. | Patch from Igor Belakovskiy. Thanks!
Modified:
shindig/trunk/features/src/main/javascript/features/core.util.onload/onload.js
Modified: shindig/trunk/features/src/main/javascript/features/core.util.onload/onload.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.util.onload/onload.js?rev=1343049&r1=1343048&r2=1343049&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/core.util.onload/onload.js (original)
+++ shindig/trunk/features/src/main/javascript/features/core.util.onload/onload.js Sun May 27 13:47:40 2012
@@ -49,7 +49,11 @@ gadgets.util = gadgets.util || {};
};
for (var i = 0, j = onLoadHandlers.length; i < j; ++i) {
- onLoadHandlers[i]();
+ try {
+ onLoadHandlers[i]();
+ } catch (ex) {
+ gadgets.warn("Could not fire onloadhandler "+ex.message);
+ }
}
onLoadHandlers = undefined; // No need to hold these references anymore.
};