riloadr.js
/*
     * Wrapper to attach load event handlers to the window
     * Notes:
     * - Compatible with async script loading
     */
Wrapper to attach load event handlers to the window
Notes:
- Compatible with async script loading
Wrapper to attach load event handlers to the window Notes : - Compatible with async script loading
function onWindowReady(fn) {
        if (doc[READYSTATE] === COMPLETE) {
            defer(fn);
        } else {
            var _fn = function() {
                removeEvent(win, LOAD, _fn);
                defer(fn);
            };
            addEvent(win, LOAD, _fn);
        }
    }
function onWindowReady ( fn ) { if ( doc [ READYSTATE ] === COMPLETE ) { defer ( fn ) ; } else { var _fn = function ( ) { removeEvent ( win , LOAD , _fn ) ; defer ( fn ) ; } ; addEvent ( win , LOAD , _fn ) ; } }
Wrapper to attach load event handlers to the window
 Notes:
 - Compatible with async script loading
Wrapper to attach load event handlers to the window Notes : - Compatible with async script loading
// Catch cases where onWindowReady is called after // the browser event has already occurred.