Bringing back the change from 80a4178af9, adapted to handle both the function collision and the issue mentioned in #7196.

This commit is contained in:
John Resig 2010-10-15 01:29:38 -04:00
parent 091c481aca
commit 497fc9849e

View file

@ -239,10 +239,6 @@ jQuery.extend({
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 );
@ -254,6 +250,10 @@ jQuery.extend({
delete window[ jsonp ];
} catch( jsonpError ) {}
}
data = tmp;
jQuery.handleSuccess( s, xhr, status, data );
jQuery.handleComplete( s, xhr, status, data );
if ( head ) {
head.removeChild( script );