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
6c681249
Commit
6c681249
authored
Dec 06, 2010
by
John Resig
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug7531' of
https://github.com/csnover/jquery
into csnover-bug7531
parents
b00ab561
c04500a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
ajax.js
src/ajax.js
+4
-1
ajax.js
test/unit/ajax.js
+10
-0
No files found.
src/ajax.js
View file @
6c681249
...
@@ -198,7 +198,10 @@ jQuery.extend({
...
@@ -198,7 +198,10 @@ jQuery.extend({
var
s
=
jQuery
.
extend
(
true
,
{},
jQuery
.
ajaxSettings
,
origSettings
),
var
s
=
jQuery
.
extend
(
true
,
{},
jQuery
.
ajaxSettings
,
origSettings
),
jsonp
,
status
,
data
,
type
=
s
.
type
.
toUpperCase
(),
noContent
=
rnoContent
.
test
(
type
);
jsonp
,
status
,
data
,
type
=
s
.
type
.
toUpperCase
(),
noContent
=
rnoContent
.
test
(
type
);
s
.
url
=
s
.
url
.
replace
(
rhash
,
""
);
// toString fixes people passing a window.location or
// document.location to $.ajax, which worked in 1.4.2 and
// earlier (bug #7531). It should be removed in 1.5.
s
.
url
=
(
""
+
s
.
url
).
replace
(
rhash
,
""
);
// Use original (not extended) context object if it was provided
// Use original (not extended) context object if it was provided
s
.
context
=
origSettings
&&
origSettings
.
context
!=
null
?
origSettings
.
context
:
s
;
s
.
context
=
origSettings
&&
origSettings
.
context
!=
null
?
origSettings
.
context
:
s
;
...
...
test/unit/ajax.js
View file @
6c681249
...
@@ -1361,6 +1361,16 @@ test("jQuery.ajax - active counter", function() {
...
@@ -1361,6 +1361,16 @@ test("jQuery.ajax - active counter", function() {
ok
(
jQuery
.
active
==
0
,
"ajax active counter should be zero: "
+
jQuery
.
active
);
ok
(
jQuery
.
active
==
0
,
"ajax active counter should be zero: "
+
jQuery
.
active
);
});
});
test
(
"jQuery.ajax - Location object as url (#7531)"
,
1
,
function
()
{
var
success
=
false
;
try
{
var
xhr
=
jQuery
.
ajax
({
url
:
document
.
location
});
success
=
true
;
xhr
.
abort
();
}
catch
(
e
)
{}
ok
(
success
,
"document.location did not generate exception"
);
});
}
}
...
...
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