Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Event Stream from Mutation Observer #811

Open
Sleepful opened this issue Jul 31, 2024 · 1 comment
Open

Feature Request: Event Stream from Mutation Observer #811

Sleepful opened this issue Jul 31, 2024 · 1 comment

Comments

@Sleepful
Copy link

Sleepful commented Jul 31, 2024

Just for convenience, it would be nice:

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver

It would be even nicer if the Event Stream handled the creation and destruction of the observer automatically to avoid typing imperative code like:

const observer = new MutationObserver(callback);
observer.observe(targetNode, config);
observer.disconnect();

RxJS example:

https://soufatn.gitbook.io/rxjs-book/summary/rxjs_bindings/dom/mutation_observers/from_mutation_observer

@Sleepful Sleepful changed the title Feature Request: Event stream from Mutation Observer Feature Request: Event Stream from Mutation Observer Jul 31, 2024
@raimohanska
Copy link
Contributor

raimohanska commented Aug 1, 2024

I’m not developing any new features to Bacon anymore. If you come up with a good pull request including tests etc I can merge it.

OTOH you can create your own helper for this without adding it to Bacon core just as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants