Closed tejaede closed 7 years ago
@hthetiot Similar behavior occurs with XHR.timeout.
var req = new XMLHttpRequest();
req.open("GET", url);
req.addEventListener("load", resolve, false);
req.addEventListener("error", resolve, false);
req.addEventListener("timeout", resolve, false);
req.timeout = self._SCRIPT_TIMEOUT; //Throws Invalid State Error
req.send();
req.listener = resolve;
Fixed by #69
This is the result of an IE quirk. IE does not allow you to set XmlHttpRequest.responseType before calling XmlHttpRequest.open(). As described here: https://stackoverflow.com/questions/20760635/why-does-setting-xmlhttprequest-responsetype-before-calling-open-throw
http2-cache overwrites XmlHttpRequest.open() and so the native open function is not called immediately. http2-cache does not also defer the setting of XmlHttpRequest.responseType so a snippet like the following results in responseType being set before the native open is called.