Skip to content

observeRootSelector not working for list of IDs #63

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

Closed
wasshuber opened this issue Jul 22, 2019 · 3 comments
Closed

observeRootSelector not working for list of IDs #63

wasshuber opened this issue Jul 22, 2019 · 3 comments

Comments

@wasshuber
Copy link

From the manual of yall.js "... you can confine the observer to any valid CSS selector".
However it doesn't work if I use a list such as "#id1,#id2,#id3,#id4".
It works with a single ID such as "#id1".

@malchata
Copy link
Owner

malchata commented Aug 1, 2019

Cursory research reveals that a single mutation observer can't operate on multiple elements. I'll need to slightly adjust how yall binds the observer(s) to element(s), which will require a slight bit of refactoring. I'll prioritize this above other issues.

@malchata malchata self-assigned this Aug 1, 2019
malchata added a commit that referenced this issue Aug 3, 2019
- Added functionality for mutation observers to observe multiple elements.
- Added a new method to abstract loops called `yallApplyFn`.
- Updated packages.
@malchata
Copy link
Owner

malchata commented Aug 3, 2019

Hi, @wasshuber. I made some changes to resolve this, but I'd like you to check to see if it serves your purposes before I go ahead and publish a new version. Here's a link to the new minified build. Hope it works!

@malchata
Copy link
Owner

Pinging @wasshuber! Did this new build help fix your issue? If so, I'd like to do a release.

malchata added a commit that referenced this issue Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants