mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #10417. setTimeout w/o 2nd arg is jQuery.later! Close gh-1065.
This commit is contained in:
@@ -190,7 +190,7 @@ if ( xhrSupported ) {
|
||||
} else if ( xhr.readyState === 4 ) {
|
||||
// (IE6 & IE7) if it's in cache and has been
|
||||
// retrieved directly we need to fire the callback
|
||||
setTimeout( callback, 0 );
|
||||
setTimeout( callback );
|
||||
} else {
|
||||
handle = ++xhrId;
|
||||
if ( xhrOnUnloadAbort ) {
|
||||
|
||||
@@ -386,7 +386,7 @@ jQuery.extend({
|
||||
|
||||
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
||||
if ( !document.body ) {
|
||||
return setTimeout( jQuery.ready, 1 );
|
||||
return setTimeout( jQuery.ready );
|
||||
}
|
||||
|
||||
// Remember that the DOM is ready
|
||||
@@ -858,7 +858,7 @@ jQuery.ready.promise = function( obj ) {
|
||||
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
|
||||
if ( document.readyState === "complete" ) {
|
||||
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
||||
setTimeout( jQuery.ready, 1 );
|
||||
setTimeout( jQuery.ready );
|
||||
|
||||
// Standards-based browsers support DOMContentLoaded
|
||||
} else if ( document.addEventListener ) {
|
||||
|
||||
2
src/effects.js
vendored
2
src/effects.js
vendored
@@ -51,7 +51,7 @@ var fxNow, timerId,
|
||||
function createFxNow() {
|
||||
setTimeout(function() {
|
||||
fxNow = undefined;
|
||||
}, 0 );
|
||||
});
|
||||
return ( fxNow = jQuery.now() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user