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
d41e8198
Commit
d41e8198
authored
May 30, 2014
by
TJ VanToll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajax: Support usage without jQuery.event
Fixes #15118 Closes gh-1588
parent
97c803ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
ajax.js
src/ajax.js
+2
-1
ajax.js
test/unit/ajax.js
+16
-0
No files found.
src/ajax.js
View file @
d41e8198
...
@@ -536,7 +536,8 @@ jQuery.extend({
...
@@ -536,7 +536,8 @@ jQuery.extend({
}
}
// We can fire global events as of now if asked to
// We can fire global events as of now if asked to
fireGlobals
=
s
.
global
;
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
fireGlobals
=
jQuery
.
event
&&
s
.
global
;
// Watch for a new set of requests
// Watch for a new set of requests
if
(
fireGlobals
&&
jQuery
.
active
++
===
0
)
{
if
(
fireGlobals
&&
jQuery
.
active
++
===
0
)
{
...
...
test/unit/ajax.js
View file @
d41e8198
...
@@ -420,6 +420,22 @@ module( "ajax", {
...
@@ -420,6 +420,22 @@ module( "ajax", {
};
};
});
});
ajaxTest
(
"#15118 - jQuery.ajax() - function without jQuery.event"
,
1
,
function
()
{
var
holder
;
return
{
url
:
url
(
"data/json.php"
),
setup
:
function
()
{
holder
=
jQuery
.
event
;
delete
jQuery
.
event
;
},
complete
:
function
()
{
ok
(
true
,
"Call can be made without jQuery.event"
);
jQuery
.
event
=
holder
;
},
success
:
true
};
});
ajaxTest
(
"jQuery.ajax() - context modification"
,
1
,
{
ajaxTest
(
"jQuery.ajax() - context modification"
,
1
,
{
url
:
url
(
"data/name.html"
),
url
:
url
(
"data/name.html"
),
context
:
{},
context
:
{},
...
...
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