A DOMParser: the browser's, or one from a DOM implementation such as
happy-dom or linkedom. Only parseFromString is used, and its result only
needs to behave like a standard XML Document; 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 or linkedom. OnlyparseFromStringis used, and its result only needs to behave like a standard XMLDocument; the return type isunknownso any implementation's ownDocumenttype is accepted without a cast.