event-ready-base.js revision caa67ea2f65d6061a950084839d5b06566a168a4
/**
* DOM event listener abstraction layer
* @module event
*/
(function() {
if (el.addEventListener) {
} else if (el.attachEvent) {
}
},
if (el.removeEventListener) {
} else if (el.detachEvent) {
}
},
globalListener = function() {
};
// add a window load event at load time so we can capture
// the case where it fires before dynamic loading is
// complete.
// these are temporary references that get removed when the
// rest of the module is finished using them.
// Unlike most of the library, this code has to be executed as soon as it is
// introduced into the page -- and it should only be executed one time
// regardless of the number of instances that use it.
D = C.doc,
_ready = function(e) {
GLOBAL_ENV._ready();
};
if (!GLOBAL_ENV._ready) {
GLOBAL_ENV.windowLoaded = false;
GLOBAL_ENV._ready = function() {
if (!GLOBAL_ENV.DOMReady) {
GLOBAL_ENV.DOMReady=true;
if (D.removeEventListener) {
}
}
};
// create custom event
/////////////////////////////////////////////////////////////
// DOMReady
// Internet Explorer: use the readyState of a defered script.
// This isolates what appears to be a safe moment to manipulate
// the DOM prior to when the document's readyState suggests
// it is safe to do so.
try {
// throws an error if doc is not ready
GLOBAL_ENV._dri = null;
_ready();
} catch (ex) {
}
}, POLL_INTERVAL);
// FireFox and Opera: These browsers provide a event for this
// moment. The latest WebKit releases now support this event.
} else {
}
/////////////////////////////////////////////////////////////
}
})();