Commit d41b9832 authored by Oleg's avatar Oleg Committed by Dave Methvin

Fix #10417. setTimeout w/o 2nd arg is jQuery.later! Close gh-1065.

parent cef044d8
...@@ -190,7 +190,7 @@ if ( xhrSupported ) { ...@@ -190,7 +190,7 @@ if ( xhrSupported ) {
} else if ( xhr.readyState === 4 ) { } else if ( xhr.readyState === 4 ) {
// (IE6 & IE7) if it's in cache and has been // (IE6 & IE7) if it's in cache and has been
// retrieved directly we need to fire the callback // retrieved directly we need to fire the callback
setTimeout( callback, 0 ); setTimeout( callback );
} else { } else {
handle = ++xhrId; handle = ++xhrId;
if ( xhrOnUnloadAbort ) { if ( xhrOnUnloadAbort ) {
......
...@@ -386,7 +386,7 @@ jQuery.extend({ ...@@ -386,7 +386,7 @@ jQuery.extend({
// 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, 1 ); return setTimeout( jQuery.ready );
} }
// Remember that the DOM is ready // Remember that the DOM is ready
...@@ -858,7 +858,7 @@ jQuery.ready.promise = function( obj ) { ...@@ -858,7 +858,7 @@ jQuery.ready.promise = function( obj ) {
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
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
setTimeout( jQuery.ready, 1 ); setTimeout( jQuery.ready );
// Standards-based browsers support DOMContentLoaded // Standards-based browsers support DOMContentLoaded
} else if ( document.addEventListener ) { } else if ( document.addEventListener ) {
......
...@@ -51,7 +51,7 @@ var fxNow, timerId, ...@@ -51,7 +51,7 @@ var fxNow, timerId,
function createFxNow() { function createFxNow() {
setTimeout(function() { setTimeout(function() {
fxNow = undefined; fxNow = undefined;
}, 0 ); });
return ( fxNow = jQuery.now() ); return ( fxNow = jQuery.now() );
} }
......
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