git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Honor stopImmediatePropagation for live/delegate event handlers. Fixes #7217.
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
d06bbab
..
915bbaa
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-208,6
+208,12
@@
jQuery.extend({
s.data = jQuery.param( s.data, s.traditional );
}
s.data = jQuery.param( s.data, s.traditional );
}
+ // If the jsonpCallback has been set, we can assume that dataType is jsonp
+ // Ticket #5803
+ if ( s.jsonpCallback ) {
+ s.dataType = "jsonp";
+ }
+
// Handle JSONP Parameter Callbacks
if ( s.dataType === "jsonp" ) {
if ( type === "GET" ) {
// Handle JSONP Parameter Callbacks
if ( s.dataType === "jsonp" ) {
if ( type === "GET" ) {
@@
-239,10
+245,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 );
@@
-254,6
+256,10
@@
jQuery.extend({
delete window[ jsonp ];
} catch( jsonpError ) {}
}
delete window[ jsonp ];
} catch( jsonpError ) {}
}
+
+ data = tmp;
+ jQuery.handleSuccess( s, xhr, status, data );
+ jQuery.handleComplete( s, xhr, status, data );
if ( head ) {
head.removeChild( script );
if ( head ) {
head.removeChild( script );