Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // BEFORE
- divElement.innerHTML = `${parsedDocument.head.innerHTML}${parsedDocument.body.innerHTML}`;
- // AFTER
- const fragment = document.createRange().createContextualFragment(`${parsedDocument.head.innerHTML}${parsedDocument.body.innerHTML}`);
- divElement.appendChild(fragment);
Advertisement
Add Comment
Please, Sign In to add comment