Increase the speed of the single setTimeout calls for the ready event.
This commit is contained in:
parent
6dfdb14753
commit
a220c81eb9
1 changed files with 2 additions and 2 deletions
|
@ -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({
|
||||||
// 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
|
||||||
|
|
Loading…
Add table
Reference in a new issue