event-ready.js revision aeadb9c6c72fd3591d37c4ad334287d209c309b4
(function() {
/*
* DOM event listener abstraction layer
* @module event
* @submodule event-base
*/
var GLOBAL_ENV = YUI.Env,
yready = function() {
Y.fire('domready');
};
Y.publish('domready', {
fireOnce: true
});
if (GLOBAL_ENV.DOMReady) {
// console.log('DOMReady already fired', 'info', 'event');
yready();
} else {
// console.log('setting up before listener', 'info', 'event');
// console.log('env: ' + YUI.Env.windowLoaded, 'info', 'event');
Y.before(yready, GLOBAL_ENV, "_ready");
}
})();