New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR for #3586 (Safari xhr timeout) #3590
Conversation
test/unit/ajax.js
Outdated
@@ -527,6 +527,23 @@ QUnit.module( "ajax", { | |||
}; | |||
} ); | |||
|
|||
ajaxTest( "jQuery.ajax() - timeout", 2, function( assert ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout
-> native timeout
, similarly to how the native abort
test case is named.
src/ajax/xhr.js
Outdated
@@ -75,7 +75,8 @@ jQuery.ajaxTransport( function( options ) { | |||
return function() { | |||
if ( callback ) { | |||
callback = errorCallback = xhr.onload = | |||
xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; | |||
xhr.onerror = xhr.onabort = xhr.ontimeout = | |||
xhr.onreadystatechange = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be indented by an additional tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the last line?
A few nits but otherwise looks good to me! |
This PR fixed the ontimeout callback being trigged by Safari on timeout discussed in #3586.