Sha256: a31caacdc11edd568a6b4c9cdd57b62bcc6dee1f816a995c06142c40cc89e496
Contents?: true
Size: 823 Bytes
Versions: 6
Compression:
Stored size: 823 Bytes
Contents
Object.extend(Event,{_domReady:function(){if(arguments.callee.done)return;arguments.callee.done=true;if(this._timer)clearInterval(this._timer);this._readyCallbacks.each(function(b){b()});this._readyCallbacks=null},onDOMReady:function(b){if(!this._readyCallbacks){var a=this._domReady.bind(this);if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,false);/*@cc_on @*/ /*@if(@_win32)document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");document.getElementById("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete")a()};/*@end @*/ if (/WebKit/i.test(navigator.userAgent)){this._timer=setInterval(function(){if(/loaded|complete/.test(document.readyState))a()},10)}Event.observe(window,'load',a);Event._readyCallbacks=[]}Event._readyCallbacks.push(b)}});
Version data entries
6 entries across 3 versions & 2 rubygems