mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Use window.QUnit to detect the top window when loading with AMD
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user