includes/clientside/static/enano-lib-basic.js
changeset 40 723bb7acf914
parent 21 663fcf528726
child 57 b354deeaa4c4
--- a/includes/clientside/static/enano-lib-basic.js	Mon Jul 02 20:33:57 2007 -0400
+++ b/includes/clientside/static/enano-lib-basic.js	Tue Jul 03 14:07:35 2007 -0400
@@ -283,7 +283,16 @@
 function addOnloadHook(func)
 {
   if ( typeof ( func ) == 'function' )
-    onload_hooks[onload_hooks.length] = func;
+  {
+    try
+    {
+      onload_hooks.push(func);
+    }
+    catch(e)
+    {
+      onload_hooks[onload_hooks.length] = func;
+    }
+  }
 }
 
 function runOnloadHooks(e)