The isTimeout fix from #970 was causing unintended status bugs (fixed). This also includes a fix for errors that occurred during an empty eval in IE (but #1410).
This commit is contained in:
parent
f267cfaedf
commit
78db847ef2
|
@ -655,8 +655,10 @@ jQuery.extend({
|
||||||
|
|
||||||
var status;
|
var status;
|
||||||
try {
|
try {
|
||||||
status = isTimeout || (jQuery.httpSuccess( xml ) ?
|
status = isTimeout == "timeout" && "timeout" ||
|
||||||
s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error");
|
!jQuery.httpSuccess( xml ) && "error" ||
|
||||||
|
s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
|
||||||
|
"success";
|
||||||
// Make sure that the request was successful or notmodified
|
// Make sure that the request was successful or notmodified
|
||||||
if ( status != "error" && status != "timeout" ) {
|
if ( status != "error" && status != "timeout" ) {
|
||||||
// Cache Last-Modified header, if ifModified mode.
|
// Cache Last-Modified header, if ifModified mode.
|
||||||
|
@ -826,13 +828,16 @@ jQuery.extend({
|
||||||
// evalulates a script in global context
|
// evalulates a script in global context
|
||||||
// not reliable for safari
|
// not reliable for safari
|
||||||
globalEval: function( data ) {
|
globalEval: function( data ) {
|
||||||
if ( window.execScript )
|
data = jQuery.trim( data );
|
||||||
window.execScript( data );
|
if ( data ) {
|
||||||
else if ( jQuery.browser.safari )
|
if ( window.execScript )
|
||||||
// safari doesn't provide a synchronous global eval
|
window.execScript( data );
|
||||||
window.setTimeout( data, 0 );
|
else if ( jQuery.browser.safari )
|
||||||
else
|
// safari doesn't provide a synchronous global eval
|
||||||
eval.call( window, data );
|
window.setTimeout( data, 0 );
|
||||||
|
else
|
||||||
|
eval.call( window, data );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue