-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Ajax: trigger error callback on native abort #2684
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
Conversation
test/unit/ajax.js
Outdated
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.
Bad indentation.
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.
Actually, this converts spaces to tabs.
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.
Yeah, but it's still indented one tab too many, isn't it?
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.
Good call.
b7ab67d to
892b57b
Compare
|
Bah, IE9 doesn't have onabort. The only other solution I see is to use .onreadystatechange, but that would change other stuff as well. |
|
Could we just document that IE9 doesn't support this? It would be a shame to let IE9 prevent us from doing the right thing for everyone else. |
|
That's probably better than switching everything back to |
|
Looking at the compat code, I don't think use of |
|
Afaict, it does require determining success/error manually again, which has historically been cumbersome. |
|
Yea, we end up losing a lot of advantages. |
|
No, we can keep the current structure and only use |
|
Ah, well I tried that first, but |
|
For example, |
|
Ah, a |
|
@dmethvin @gibson042 This works. Let me know if you have ideas to get it smaller. |
- IE9 does not have onabort. Use onreadystatechange instead. Fixes jquerygh-2079
Except for synchronous requests, right? |
Right. That's quite an edge case, tho. IE9, native abort, sync only. |
Fixes gh-2079