Skip to content

responseType=document only supports XML not HTML #194

@kaikiai

Description

@kaikiai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions