Skip to content
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

XMLHttpRequest response property doesn't exist in IE9 #32

Open
toretore opened this issue Aug 4, 2017 · 2 comments
Open

XMLHttpRequest response property doesn't exist in IE9 #32

toretore opened this issue Aug 4, 2017 · 2 comments

Comments

@toretore
Copy link

toretore commented Aug 4, 2017

The response property as used here:

https://github.com/elm-lang/http/blob/master/src/Native/Http.js#L154

was only added to IE10 according to https://msdn.microsoft.com/en-us/library/hh872881(v=vs.85).aspx

This results in a "Given an invalid JSON" error, or "This is not valid JSON!" in master at

https://github.com/elm-lang/core/blob/master/src/Elm/Kernel/Json.js#L149

as string will be undefined.

I'm not sure about the correct solution, especially with streaming or large payloads, but I've confirmed that in my simple case of a small JSON response, manually changing the generated JS to use responseText makes it work in IE9.

Edit: I should add that this is tested in IE11 in IE9 "document mode".

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@harmboschloo
Copy link

I'm having the same issue. Just as a reference, this is how superagent handles response and responseText here and here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants