- From: Diego Ferreiro Val <notifications@github.com>
- Date: Wed, 05 Jun 2019 17:51:15 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/816/499187706@github.com>
I think for complex use cases like ours, where we have components from multiple authors running in the same page and the elements to be loaded are "somewhat unknown" until runtime, passing a fixed set to the Observer API will be tricky. So having a flag either on attachShadow on in ElementInternals would be preferable since it will give us holistic control (assuming shadow creation has an abstraction, which most frameworks do). > I objected to (2) since it breaks the encapsulation of shadow roots. @rniwa would you object even if the flag will make the observability opaque? Basically something similar to what @domenic suggested: if I flag a shadow to be "perf-observable", whatever is reported is tied to the custom-element and none of the internals, So any marked image or svg inside (not sure about light-shadow), will be aggregated an reported as it was in the host custom element. Ex: ``` <my-button> #shadow <img src="/icon/foo.png"> <img src="/icon/bar.png"> </my-button> /* Observer entry will be: { element: my-button, identifier: // we probably want to not leak this neither? url: // probably null or an array? startTime: the first url duration: the last url } */ ``` As a final though, we would love to see this implemented whatever way makes everyone happy :) -- 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-499187706
Received on Wednesday, 5 June 2019 17:51:38 UTC