mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Core: Switch from modules to just window.setTimeout etc.
Using modules for window.setTimeout etc. made those functions cached and disabled Sinon mocking, making effects tests fail. Just writing window.setTimeout directly is smaller anyway.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
define([
|
||||
"../core",
|
||||
"../var/document",
|
||||
"../var/setTimeout",
|
||||
"../deferred"
|
||||
], function( jQuery, document, setTimeout ) {
|
||||
], function( jQuery, document ) {
|
||||
|
||||
// The deferred used on DOM ready
|
||||
var readyList;
|
||||
@@ -74,7 +73,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 );
|
||||
window.setTimeout( jQuery.ready );
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user