alt
Hacker News
austin-cheney
•
today at 8:02 PM
•
0 replies
•
view 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.