Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
xchkr1337
· 3y ago · 0 comments
reassigning document.body.innerHTML like that seems like a really bad idea, this should be done using MutationObserver
Comments
[–]
kevincox
3y ago
Yup. It will recreate all elements. At the very least it will break event listeners which will break most sites. It will probably do about 8 other things that break many sites.