I\'m attempting to parse a string into a full HTML document via DOMParser and then overwrite the current page with the processed nodes. The string contains complete markup,
You should use:
const sHtml = ''; const frag = document.createRange().createContextualFragment(sHtml) document.body.appendChild( frag );