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
b718a169b5
commit
9f433d9fec
4
test/jquery.js
vendored
4
test/jquery.js
vendored
@ -26,7 +26,9 @@
|
||||
label: "Load with AMD",
|
||||
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 });
|
||||
src = "src/jquery";
|
||||
// Include tests if specified
|
||||
|
Loading…
Reference in New Issue
Block a user