-
Notifications
You must be signed in to change notification settings - Fork 18
How should Element Timing interact with Shadow DOM? #3
Description
Element Timing exposes rendering timing information about images (and we want to add text soon). It has some attributes which contain useful information for attribution such as element. However, right now we are not specifying anything special about elements that are contained in shadow trees (not even if those are closed). What should we do in these cases? I guess we can split this question into two:
- What should be done for open trees?
- What should be done for closed trees?
Possible alternatives I can think of:
- Do no special handling: expose entries, with all the attributes set.
- Expose PerformanceElementTiming entries but with some attributes such as
elementset to null. - Expose PerformanceElementTiming entries, but setting the
elementto the shadow host. - Do not expose entries at all.
- Make it opt-in so that a developer must set a bit in order to get entries from shadow DOM.
I'd like some feedback here. Any thoughts? @annevk @rniwa
Also tagging @hayatoito who was the one who suggested the opt-in option for open shadow trees and said we should not expose the elements of closed shadow trees. I understand this constraint (and I will need to explicitly add checks to the spec) but we also want to enable developers to measure the performance of their website, and shadow trees can affect it, so ideally we can still expose valuable attribution.