event-ready.js revision 6a3faa9e0e4639febffbd7018ce47b861626d0ba
(function() {
/**
* DOM event listener abstraction layer
* @module event
*/
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");
}
})();