Increase the speed of the single setTimeout calls for the ready event.

This commit is contained in:
jeresig 2010-09-24 10:06:36 -04:00
parent 6dfdb14753
commit a220c81eb9

View file

@ -397,7 +397,7 @@ jQuery.extend({
if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
return setTimeout( jQuery.ready, 13 );
return setTimeout( jQuery.ready, 1 );
}
// Remember that the DOM is ready
@ -438,7 +438,7 @@ jQuery.extend({
// browser event has already occurred.
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
return setTimeout( jQuery.ready, 13 );
return setTimeout( jQuery.ready, 1 );
}
// Mozilla, Opera and webkit nightlies currently support this event