mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Use window.QUnit to detect the top window when loading with AMD
This commit is contained in:
parent
01d5a1a1c9
commit
ca1c90e55c
4
test/jquery.js
vendored
4
test/jquery.js
vendored
@ -26,7 +26,9 @@
|
|||||||
label: "Load with AMD",
|
label: "Load with AMD",
|
||||||
tooltip: "Load the AMD jQuery file (and its dependencies)"
|
tooltip: "Load the AMD jQuery file (and its dependencies)"
|
||||||
});
|
});
|
||||||
if ( QUnit.urlParams.amd && parent == window ) {
|
// If QUnit is on window, this is the main window
|
||||||
|
// This detection allows AMD tests to be run in an iframe
|
||||||
|
if ( QUnit.urlParams.amd && window.QUnit ) {
|
||||||
require.config({ baseUrl: src });
|
require.config({ baseUrl: src });
|
||||||
src = "src/jquery";
|
src = "src/jquery";
|
||||||
// Include tests if specified
|
// Include tests if specified
|
||||||
|
Loading…
Reference in New Issue
Block a user