Commit a220c81e authored by jeresig's avatar jeresig

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

parent 6dfdb147
...@@ -397,7 +397,7 @@ jQuery.extend({ ...@@ -397,7 +397,7 @@ jQuery.extend({
if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) { if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) { if ( !document.body ) {
return setTimeout( jQuery.ready, 13 ); return setTimeout( jQuery.ready, 1 );
} }
// Remember that the DOM is ready // Remember that the DOM is ready
...@@ -438,7 +438,7 @@ jQuery.extend({ ...@@ -438,7 +438,7 @@ jQuery.extend({
// browser event has already occurred. // browser event has already occurred.
if ( document.readyState === "complete" ) { if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready // 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 // Mozilla, Opera and webkit nightlies currently support this event
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment