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
aa743969
Commit
aa743969
authored
Nov 09, 2010
by
John Resig
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug7422' of
https://github.com/csnover/jquery
into csnover-bug7422
parents
fb48ae8e
e57b73a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
ajax.js
src/ajax.js
+5
-4
ajax.js
test/unit/ajax.js
+4
-1
No files found.
src/ajax.js
View file @
aa743969
...
...
@@ -463,10 +463,11 @@ jQuery.extend({
try
{
var
oldAbort
=
xhr
.
abort
;
xhr
.
abort
=
function
()
{
// xhr.abort in IE7 is not a native JS function
// and does not have a call property
if
(
xhr
&&
oldAbort
.
call
)
{
oldAbort
.
call
(
xhr
);
if
(
xhr
)
{
// oldAbort has no call property in IE7 so
// just do it this way, which works in all
// browsers
Function
.
prototype
.
call
.
call
(
oldAbort
,
xhr
);
}
onreadystatechange
(
"abort"
);
...
...
test/unit/ajax.js
View file @
aa743969
...
...
@@ -137,7 +137,7 @@ test(".load()) - 404 error callbacks", function() {
});
test
(
"jQuery.ajax() - abort"
,
function
()
{
expect
(
6
);
expect
(
8
);
stop
();
jQuery
(
'#foo'
).
ajaxStart
(
function
(){
...
...
@@ -157,7 +157,10 @@ test("jQuery.ajax() - abort", function() {
complete
:
function
(){
ok
(
true
,
"complete"
);
}
});
equals
(
xhr
.
readyState
,
1
,
"XHR readyState indicates successful dispatch"
);
xhr
.
abort
();
equals
(
xhr
.
readyState
,
0
,
"XHR readyState indicates successful abortion"
);
});
test
(
"Ajax events with context"
,
function
()
{
...
...
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