-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error with timeout in ie11 #5
Comments
@tume I need to review this timeout logic. It was not tested correctly and it does not behave correctly. I'm thinking about rolling back. I'll come back soon with a better solution. |
Just for the record. The bug is gone (in IE11) if you set the timeout after the xhr.timeout = 5000;
xhr.open("GET", 'http://....', true); you'll get the exception. The following works fine: xhr.open("GET", 'http://....', true);
xhr.timeout = 5000; I guess the lovely IE11 wants to have the XHR object initialized before getting more commands. |
fix error stephanebachelier/superapi#5. fix error "not valid for es5"
I'm getting InvalidStateError with ie11 when doing requests and the "culprit" seems to be this line:
req.xhr.timeout = timeout;
If I remove it everything works fine. Not sure what is the actual cause because didn't have time to debug this more but my guess is that it is setting timeout too early/late and for some reason ie doesn't like it.
Superagent seems to provide some timeout support also so one option might be using that if possible?
One other related note is that would be nice to be able to skip the timeout by specifying 0 which is not really possible at the moment.
The text was updated successfully, but these errors were encountered: