From: jeresig Date: Tue, 15 Jun 2010 03:05:01 +0000 (-0400) Subject: Tweak spacing from last commit. X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=c34a62f8abbd9598e7a6647754c449ce92418b3a Tweak spacing from last commit. --- diff --git a/speed/benchmarker.css b/speed/benchmarker.css old mode 100644 new mode 100755 diff --git a/speed/benchmarker.js b/speed/benchmarker.js old mode 100644 new mode 100755 diff --git a/speed/index.html b/speed/index.html old mode 100644 new mode 100755 diff --git a/src/ajax.js b/src/ajax.js index ffd870c..47f243e 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -238,23 +238,24 @@ jQuery.extend({ // Handle JSONP-style loading var customJsonp = window[ jsonp ]; + window[ jsonp ] = function( tmp ) { data = tmp; jQuery.ajax.handleSuccess( s, xhr, status, data ); jQuery.ajax.handleComplete( s, xhr, status, data ); if ( jQuery.isFunction( customJsonp ) ) { - customJsonp( tmp ); - } - else { - // Garbage collect - window[ jsonp ] = undefined; - - try { - delete window[ jsonp ]; - } catch( jsonpError ) {} - } - + customJsonp( tmp ); + + } else { + // Garbage collect + window[ jsonp ] = undefined; + + try { + delete window[ jsonp ]; + } catch( jsonpError ) {} + } + if ( head ) { head.removeChild( script ); } @@ -444,8 +445,9 @@ jQuery.extend({ // Fire the complete handlers if ( !jsonp ) { - jQuery.ajax.handleComplete( s, xhr, status, data ); - } + jQuery.ajax.handleComplete( s, xhr, status, data ); + } + if ( isTimeout === "timeout" ) { xhr.abort(); }