Re: [w3c/webcomponents] Measuring performance of shadow DOM (#848)

The shadowDOM encapsulation is just that, encapsulation. And if you have arbitrary code traversing into the internals of the shadow, then why bother to have encapsulation in the first place? So, no, I don't think asking for a way to introspect into a shadow that you don't own just to measure the performance of elements is something that should be solved by breaking the encapsulation. This remind me of the webdriver shadow dom traversals conversations.

Now, if the code that is doing the measurements is "high-privilege" code (runs before everything else), then you might have other ways to achieve the same, e.g.: patching `Element.prototype.attachShadow` to get access to any constructed shadow, not pretty, but has worked for us in the past for performance and click tracking.

-- 
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/848#issuecomment-543256389

Received on Thursday, 17 October 2019 16:30:28 UTC