Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception when setting XHR responseType parameter
According to the XHR spec (http://xhr.spec.whatwg.org/#the-responsetype-attribute) and https://bugzilla.mozilla.org/show_bug.cgi?id=707484 it is legal to set the responseType attribute before opening the request. However, this doesn't work with current versions of Firefox and results in an exception. Work around this issue by setting the xhr.responseType attribute only after opening the request. Also if the caller explicitly specifies a desired response type, report an error instead of silently returning an unexpected data type if the xhr.responseType assignment fails. Fixes browserify#65
- Loading branch information