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

> "to implement polyfills of certain features that affect HTML syntax across both light and shadow DOM because it requires observing mutations in shadow trees as well" ... "Any new HTML element or attribute"
> 
> So what issue there exactly are you trying to solve?

To implement polyfills of new HTML syntax, you need to be able to react to relevant changes in the DOM. E.g. for a new attribute `foobar`, you need to be able to react when someone adds a `foobar` attribute *anywhere*, including deeply nested Shadow DOM. Doing this with the current MutationObserver API is a hack (I listed how in the OP). Does that make sense? If not, it would help to try and formulate an actual question on what part you find confusing. 

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

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

Received on Thursday, 6 June 2024 15:21:07 UTC