Skip to content Skip to sidebar Skip to footer

Minimal JS Sources For Wiping Out The Whole DOM

This originally came as a spin off from https://stackoverflow.com/q/45390025/1737973. Sometimes, when JS is supported and enabled in the browser, I find it more useful to rebuild m

Solution 1:

document.body.innerHTML = ""
document.head.innerHTML=""

...but why?


Post a Comment for "Minimal JS Sources For Wiping Out The Whole DOM"