aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
748 stars 128 forks source link

XHR InvalidStateError in IE #63

Closed ghost closed 7 years ago

ghost commented 7 years ago

XHR InvalidStateError in IE.

Can be fixed by moving

xhr.open(method, this._url);

and place it after

var xhr = this._createXHRObject();

aadsm commented 7 years ago

Which version of IE? I haven't tested on IE for a while.

ghost commented 7 years ago

Not just IE, in old Firefox too. This is bug in XHR implementatios. It's known.

If you want to set anything, such as timeout or responseType, you must open before you set, otherwise exception is thrown if the state is not OPENED or HEADERS_RECEIVED.