Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:jquery/jquery into deferred

  • Loading branch information...
jaubourg committed Dec 30, 2010
2 parents 7490eb4 + dfa5707 commit 64902e03450dc9164dbdb046a701008a249497c1
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/transports/script.js
@@ -47,10 +47,9 @@ jQuery.ajax.transport("script", function(s) {
script.src = s.url;

// Attach handlers for all browsers
script.onload = script.onreadystatechange = function(statusText) {
script.onload = script.onreadystatechange = function( _ , statusText) {

if ( (!script.readyState ||
script.readyState === "loaded" || script.readyState === "complete") ) {
if ( ! script.readyState || /loaded|complete/.test( script.readyState ) ) {

// Handle memory leak in IE
script.onload = script.onreadystatechange = null;
@@ -60,10 +59,10 @@ jQuery.ajax.transport("script", function(s) {
head.removeChild( script );
}

script = undefined;
script = 0;

// Callback & dereference
callback(statusText ? 0 : 200, statusText || "success");
// Callback
callback( statusText ? 0 : 200, statusText || "success" );
}
};
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
@@ -73,7 +72,7 @@ jQuery.ajax.transport("script", function(s) {

abort: function(statusText) {
if ( script ) {
script.onload(statusText);
script.onload( 0 , statusText );
}
}
};

0 comments on commit 64902e0

Please sign in to comment.
You can’t perform that action at this time.