git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8fb4d9a
)
Handle issue with two concurrent JSONP requests that use the same callback name.
author
Pinhook
<contact@pinhooklabs.com>
Wed, 13 Oct 2010 14:30:19 +0000
(10:30 -0400)
committer
jeresig
<jeresig@gmail.com>
Wed, 13 Oct 2010 14:30:19 +0000
(10:30 -0400)
src/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax.js
b/src/ajax.js
index
d06bbab
..
f3252eb
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-239,10
+239,6
@@
jQuery.extend({
var customJsonp = window[ jsonp ];
window[ jsonp ] = function( tmp ) {
var customJsonp = window[ jsonp ];
window[ jsonp ] = function( tmp ) {
- data = tmp;
- jQuery.handleSuccess( s, xhr, status, data );
- jQuery.handleComplete( s, xhr, status, data );
-
if ( jQuery.isFunction( customJsonp ) ) {
customJsonp( tmp );
if ( jQuery.isFunction( customJsonp ) ) {
customJsonp( tmp );
@@
-258,6
+254,10
@@
jQuery.extend({
if ( head ) {
head.removeChild( script );
}
if ( head ) {
head.removeChild( script );
}
+
+ data = tmp;
+ jQuery.ajax.handleSuccess( s, xhr, status, data );
+ jQuery.ajax.handleComplete( s, xhr, status, data );
};
}
};
}