// Event.onDOMReady for Prototype // by Vivabit via Dean Edwards: // http://dean.edwards.name/weblog/2006/06/again/ Object.extend(Event, { _domReady : function() { if (arguments.callee.done) return; arguments.callee.done = true; if (this._timer) clearInterval(this._timer); this._readyCallbacks.each(function(f) { f() }); this._readyCallbacks = null; }, onDOMReady : function(f) { if (!this._readyCallbacks) { var domReady = this._domReady.bind(this); if (document.addEventListener) document.addEventListener("DOMContentLoaded", domReady, false); /*@cc_on @*/ /*@if (@_win32) document.write("