Event Emitter for MutationObserver
Donsky-Osano opened this issue · 2 comments
How would you feel about adding an EventEmitter and exposing it to be able to watch for new scripts being appended to the DOM so we can check if we want to unblock them?
I wouldn't mind doing the PR
Hey @Donsky-Osano,
How would you feel about adding an EventEmitter and exposing it to be able to watch for new scripts being appended to the DOM so we can check if we want to unblock them?
Conceptually it would be a nice addition.
But one thing to consider is that yett
must load/execute synchronously before other scripts. This means that it should remain as small as possible.
Personally I think that being able to use regexes for whitelists/blacklists is quite expressive already!
@elbywan Thanks, but I wrote my own solution since it's so few lines of code anyways instead of adding a dependency which is usually preferred. Cheers!