PDA

View Full Version : onDocumentReady error in Revision 9



Domitian
23 Feb 2007, 6:57 PM
Override is used in the method, but it's not a parameter therefore, Firebug reports override not defined.

Existing Version


onDocumentReady : function(fn, scope, options){
if(docReadyState){
fn.call(override? scope || window : window, scope);
return;
}
if(!docReadyEvent){
initDocReady();
}
docReadyEvent.addListener(fn, scope, options);
},


Fix:


onDocumentReady : function(fn, scope, override){
if(docReadyState){
fn.call(override ? scope || window : window, scope);
return;
}
if(!docReadyEvent){
initDocReady();
}
docReadyEvent.addListener(fn, scope, override);
},