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

> So where are the entries exposed? I thought it was a global method/getter?

The entries are exposed to [PerformanceObserver](https://w3c.github.io/performance-timeline/#dom-performanceobserver). An observer can receive entries from elements corresponding to its Window.

Maybe it's worth clarifying how entries are created right now. I recently updated the [explainer](https://github.com/WICG/element-timing#how-do-we-register-elements-for-observation): there's an entry per image, per background-image (per affected element), and per group of text nodes (for example, to try to group text nodes belonging to a single paragraph under the same p element).

Exposing a single entry for each shadow tree could be an option, though it seems incomparable with these other entries. I'm also unsure how we'd define the time the shadow tree is 'ready': when all of the images and text nodes associated with it are ready?

> Given element timing currently only supports measuring `img` and SVG `image` elements and elements with background images for now, the only shadow host with a background image is measurable as is.

We're also adding support for groups of text nodes (grouped under a single element).

> Since elements inside shadow trees are considered as implementation details, no element marked with `elementtiming` inside shadow trees should be reported to the performance timeline.

So the only options are aggregating entries into an entry per shadow tree (I guess not including nested shadow trees, I'm not sure if there's a name for this), or omitting any entries of shadow trees altogether?

-- 
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-494495362

Received on Tuesday, 21 May 2019 18:00:23 UTC