Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
34c4e122
Commit
34c4e122
authored
Jan 30, 2013
by
jrburke
Committed by
Dave Methvin
Feb 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the define.amd.jQuery check, ref gh-1150.
parent
3f05afbd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
exports.js
src/exports.js
+8
-13
testinit.js
test/data/testinit.js
+1
-3
No files found.
src/exports.js
View file @
34c4e122
...
@@ -8,19 +8,14 @@ if ( typeof module === "object" && typeof module.exports === "object" ) {
...
@@ -8,19 +8,14 @@ if ( typeof module === "object" && typeof module.exports === "object" ) {
// Otherwise expose jQuery to the global object as usual
// Otherwise expose jQuery to the global object as usual
window
.
jQuery
=
window
.
$
=
jQuery
;
window
.
jQuery
=
window
.
$
=
jQuery
;
// Expose jQuery as an AMD module, but only for AMD loaders that
// Register as a named AMD module, since jQuery can be concatenated with other
// understand the issues with loading multiple versions of jQuery
// files that may use define, but not via a proper concatenation script that
// in a page that all might call define(). The loader will indicate
// understands anonymous AMD modules. A named AMD is safest and most robust
// they have special allowances for multiple jQuery versions by
// way to register. Lowercase jquery is used because AMD module names are
// specifying define.amd.jQuery = true. Register as a named module,
// derived from file names, and jQuery is normally delivered in a lowercase
// since jQuery can be concatenated with other files that may use define,
// file name. Do this after creating the global so that if an AMD module wants
// but not use a proper concatenation script that understands anonymous
// to call noConflict to hide this version of jQuery, it will work.
// AMD modules. A named AMD is safest and most robust way to register.
if
(
typeof
define
===
"function"
&&
define
.
amd
)
{
// Lowercase jquery is used because AMD module names are derived from
// file names, and jQuery is normally delivered in a lowercase file name.
// Do this after creating the global so that if an AMD module wants to call
// noConflict to hide this version of jQuery, it will work.
if
(
typeof
define
===
"function"
&&
define
.
amd
&&
define
.
amd
.
jQuery
)
{
define
(
"jquery"
,
[],
function
()
{
return
jQuery
;
}
);
define
(
"jquery"
,
[],
function
()
{
return
jQuery
;
}
);
}
}
}
}
test/data/testinit.js
View file @
34c4e122
...
@@ -19,9 +19,7 @@ function define( name, dependencies, callback ) {
...
@@ -19,9 +19,7 @@ function define( name, dependencies, callback ) {
amdDefined
=
callback
();
amdDefined
=
callback
();
}
}
define
.
amd
=
{
define
.
amd
=
{};
jQuery
:
true
};
/**
/**
* Returns an array of elements with the given IDs
* Returns an array of elements with the given IDs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment