A DOMParser: the browser's, or one from a DOM implementation such as
happy-dom. Only parseFromString is used, and its result only needs to
behave like a standard XML Document, XML namespaces included (linkedom's
doesn't); the return type is unknown so any implementation's own
Document type is accepted without a cast.
A
DOMParser: the browser's, or one from a DOM implementation such as happy-dom. OnlyparseFromStringis used, and its result only needs to behave like a standard XMLDocument, XML namespaces included (linkedom's doesn't); the return type isunknownso any implementation's ownDocumenttype is accepted without a cast.