X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=bd9fb455a86d4cbe35904596284a3035408e826b;hb=ba149e78a93afa9eab544c7defe3ccf0d412345a;hp=e6154806808093afcd5e84df95a2ecde89b3ae23;hpb=873c28425fb64fdb48cfa09d17041bded39b301f;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index e615480..bd9fb45 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -458,12 +458,14 @@ jQuery.extend({ } }; - // Override the abort handler, if we can (IE doesn't allow it, but that's OK) + // Override the abort handler, if we can (IE 6 doesn't allow it, but that's OK) // Opera doesn't fire onreadystatechange at all on abort try { var oldAbort = xhr.abort; xhr.abort = function() { - if ( xhr ) { + // xhr.abort in IE7 is not a native JS function + // and does not have a call property + if ( xhr && oldAbort.call ) { oldAbort.call( xhr ); } @@ -698,12 +700,12 @@ if ( window.ActiveXObject ) { if ( window.location.protocol !== "file:" ) { try { return new window.XMLHttpRequest(); - } catch(e) {} + } catch(xhrError) {} } try { return new window.ActiveXObject("Microsoft.XMLHTTP"); - } catch(e) {} + } catch(activeError) {} }; }