Fixes #8744. Makes sure script transport abort method actually removes the script tag even if readyState exists.

This commit is contained in:
jaubourg 2011-04-04 17:41:30 +02:00
parent fcc112f406
commit 2ed81b44be

View file

@ -53,7 +53,7 @@ jQuery.ajaxTransport( "script", function(s) {
// Attach handlers for all browsers // Attach handlers for all browsers
script.onload = script.onreadystatechange = function( _, isAbort ) { script.onload = script.onreadystatechange = function( _, isAbort ) {
if ( !script.readyState || /loaded|complete/.test( script.readyState ) ) { if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
// Handle memory leak in IE // Handle memory leak in IE
script.onload = script.onreadystatechange = null; script.onload = script.onreadystatechange = null;