← You're polling setInterval to detect DOM changes. `MutationObserver` fires when they happen.
Playground
MutationObserver — interactive playground
preview
Edits run in a sandbox in your browser — nothing is saved and nothing leaves the page.
Edits run in a sandbox in your browser — nothing is saved and nothing leaves the page.