includes/clientside/static/enano-lib-basic.js
changeset 59 7c4a851fb5c5
parent 57 b354deeaa4c4
child 85 7c68a18a27be
equal deleted inserted replaced
58:8f532d8ab5f5 59:7c4a851fb5c5
   273 
   273 
   274 function addOnloadHook(func)
   274 function addOnloadHook(func)
   275 {
   275 {
   276   if ( typeof ( func ) == 'function' )
   276   if ( typeof ( func ) == 'function' )
   277   {
   277   {
   278     try
   278     if ( typeof(onload_hooks.push) == 'function' )
   279     {
   279     {
   280       onload_hooks.push(func);
   280       onload_hooks.push(func);
   281     }
   281     }
   282     catch(e)
   282     else
   283     {
   283     {
   284       onload_hooks[onload_hooks.length] = func;
   284       onload_hooks[onload_hooks.length] = func;
   285     }
   285     }
   286   }
   286   }
   287 }
   287 }