Skip to content

MutationObserver attribute filter ignores attributes with a namespace #1364

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

Open
josepharhar opened this issue Mar 14, 2025 · 1 comment
Open

Comments

@josepharhar
Copy link
Contributor

What is the issue with the DOM Standard?

When the attributesFilter property is used for a MutationObserver, attributes with namespaces are unconditionally excluded from getting mutation records:

https://dom.spec.whatwg.org/#queueing-a-mutation-record

type is "attributes", options["attributeFilter"] exists, and options["attributeFilter"] does not contain name or namespace is non-null

I don't know any of the history here, but this capability was asked for here: https://issues.chromium.org/issues/392661412

@annevk
Copy link
Member

annevk commented Mar 14, 2025

This is by design. We'd have to extend attributeFilter to also support namespaced attributes. For however long this feature has existed there have been no requests for that, but it's certainly possible to add.

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

No branches or pull requests

2 participants