(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");
}
})();