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
XHR throws an exception accessing responseText, if responseType === "arraybuffer" #2498
Comments
|
Probably I need to go back to a |
|
It seems like this is subverting the normal |
|
I defined it using However I didn't get the converter right, do you know how to do it? Btw. there's no need for responseText or other string types, I just want to see the hard bytes in an ArrayBuffer! :) |
|
Although #2521 didn't have quite the right approach, I think the main issue is that the normal path that the code takes generates an error when the |
|
Please, just try it. Open your console and have a look. |
Fixes jquery#2498 The added unit test shows how this could be used to support an ArrayBuffer return, but $.ajax does not support it natively. The goal with this change was to avoid the exception.
If you try using
xhr.responseType = "arraybuffer"(jqXHR.xhrFields = { responseType: "arraybuffer" }), the code issues an exceptionInvalidStateError(in Firefox, when accessingresponseText, instead ofresponse):I changed jquery-1.6.1; now I'm going to work with a current version to make a PR or does anyone have something laying around...?
The text was updated successfully, but these errors were encountered: