From 49670c5f483d944eafdcc494e697f04fd6d9fbbd Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Fri, 16 Aug 2013 14:36:08 -0400 Subject: [PATCH] Don't execute DOM ready tests in AMD mode (they aren't loaded before DOM ready). Close gh-1335. --- src/manipulation.js | 3 ++- test/unit/event.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/manipulation.js b/src/manipulation.js index 8cc7624bf..faa11eb28 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -3,13 +3,14 @@ define([ "./var/concat", "./var/push", "./var/deletedIds", + "./var/strundefined", "./manipulation/var/rcheckableType", "./data/accepts", "./selector", "./traversing", "./event", "./support" -], function( jQuery, concat, push, deletedIds, rcheckableType ){ +], function( jQuery, concat, push, deletedIds, strundefined, rcheckableType ){ function createSafeFragment( document ) { var list = nodeNames.split( "|" ), diff --git a/test/unit/event.js b/test/unit/event.js index 40fb73281..704c49636 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -2521,6 +2521,12 @@ if ( hasPHP ) { (function(){ // This code must be run before DOM ready! + if ( QUnit.urlParams.amd ) { + + // If we load jQuery through requirejs DOM will be already loaded + return; + } + var notYetReady, noEarlyExecution, order = [], args = {}; -- 2.39.5