logoalt Hacker News

austin-cheneytoday at 8:02 PM0 repliesview on HN

Another solution is just use this at the start of your code:

    delete Element.prototype.innerHTML;
Then assignments to innerHTML do not modify the element's textContent or child node list and assignments to it will not throw an error.