Re: [whatwg/dom] `MutationObserver` flag to observe mutations in (open) shadow trees to facilitate polyfills of HTML syntax (Issue #1287)

LeaVerou left a comment (whatwg/dom#1287)

I edited the OP to remove the previous Option 2 (`globalObserve()`) and to add a new alternative: a `shadowAttached` boolean option. Together with `:has-shadow` ( https://github.com/w3c/csswg-drafts/issues/11007 ), they allow implementing this pattern in userland, is much simpler (only a boolean option is necessary, since existence of closed shadow roots can already be observed), and a lot easier to implement. And even if we later add a `shadowRoots` option, observing shadow root creation is still independently useful.

Happy to prototype a PR if we decide this is a direction worth pursuing (agenda+ed for that)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1287#issuecomment-4781490125
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1287/4781490125@github.com>

Received on Tuesday, 23 June 2026 16:52:00 UTC