Re: [w3c/webcomponents] Shadow tree encapsulation and Element Timing (#816)

I don't think exposing nodes in a shadow root without users of the API explicitly requesting nodes inside the shadow root is acceptable. Consider `MutationObserver` for example. When the mutation observer *monitors* the subtree, it doesn't also monitor shadow tree.

The problem here is that the existing scripts and code that uses the performance timeline to aggregate information, for example, shouldn't be encountering a node inside a shadow tree. That goes against the goal of avoiding accidental encountering of nodes within a shadow tree. In general, nodes in an open or closed shadow tree should never be exposed to API on `document` or `window` without an explicit opt-in from both the author of the shadow tree as well as the users of the API; e.g. scripts monitoring the performance timeline.

To reiterate my point earlier, at minimum, we need to an explicit method on `Performance` which asks for *composed* entries instead of exposing nodes in shadow trees to existing clients.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/816#issuecomment-502341609

Received on Saturday, 15 June 2019 07:04:47 UTC