dom
dom copied to clipboard
Add new mutation observer init options elementByAttributeFilter and elementFilter
Adds additional options when constructing a MutationObserver
.
MutationObserverInit now contains two additional options: elementByAttributeFilter
and elementFilter
which are used to enhance the precision of filtering DOM nodes to observe.
See #398 for the background.
- [x] At least two implementers are interested (and none opposed):
- @rniwa
- @annevk ?
- [ ] Tests are written and can be reviewed and commented upon at:
- … TODO
- [ ] Implementation bugs are filed:
- Chrome: None yet
- Firefox: None yet
- Safari: None yet
(See WHATWG Working Mode: Changes for more details.)
@AndrewRot can Shape Security sign https://participate.whatwg.org/agreement? Previously that ended up not happening, but not sure what the reason was.
@rniwa I don't see anything obvious that could be causing this error:
LINK ERROR: Multiple possible 'dfn' local refs for 'element'.
@mfreed7 any thoughts from Google on this?
FWIW, we're supportive of this proposal.
@annevk yes - I've gotten written approval to sign off on the agreement from our legal department as well as my team managers.
@annevk looks like agreement was filled out. Though I just added my manager as a secondary contact.
All comments appear to have been addressed. At this point, the only thing missing seems to be the tests? I can start on those.
@AndrewRot that sounds great, thank you! Once the tests are there I'm happy to give this another pass.
Has there been any progress on the tests? I'm working on a product which would benefit from this Mutation Observer filter feature, and might be able to assist with tests if there is interest.
@mfreed7 ping on Chromium interest. @smaug---- Gecko?
@bershanskiy I'd be happy to pick up the remaining specification work assuming @AndrewRot no longer has the bandwidth if you can sort the tests. Thanks for volunteering!
Hi @bershanskiy & @annevk - I'm glad this feature is useful for others! Yes, feel free to take the reins from here. I do not currently have the bandwidth to allocate for this feature.
Gecko would implement this or some variant of it. (which isn't super surprising since looks like I filed https://github.com/whatwg/dom/issues/398 )
@mfreed7 ping on Chromium interest. @smaug---- Gecko?
@bershanskiy I'd be happy to pick up the remaining specification work assuming @AndrewRot no longer has the bandwidth if you can sort the tests. Thanks for volunteering!
Looks like a good addition to MutationObserver
which would avoid boilerplate JS and speed things up a lot. I'm supportive!