w3c / w3c/element-timing

How should Element Timing interact with Shadow DOM?

Open
#3 46 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
61
Forks
19
Avg merge
1d 10h
Merged PRs (30d)
1

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 element set to null.
  • Expose PerformanceElementTiming entries, but setting the element to 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Element Timing specification and the 46-comment discussion on how entries from open and closed shadow trees should behave. The work is ready only after the project reaches a decision and the chosen behavior is specified for both cases, including attribution and exposure.

Written by the indexing model from the issue text.

Assessment

Domain
api, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.