I discovered a problem with responseType='document' in FakeXHR.
When using responseType in browser it is usable with XML and with HTML.
FakeXHR only works with XML
function convertResponseBody(responseType, contentType, body) {
....
} else if (responseType === "document") {
if (isXmlContentType(contentType)) {
return FakeXMLHttpRequest.parseXML(body);
}
return null;
}
should also be usable with content-type='text/html' and then not parsing with XML but instead use a parser with text/html as mime-type
I discovered a problem with responseType='document' in FakeXHR.
When using responseType in browser it is usable with XML and with HTML.
FakeXHR only works with XML
should also be usable with content-type='text/html' and then not parsing with XML but instead use a parser with text/html as mime-type