How should Container Timing attributes work? Could multiple observers have different views?
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 72
- Forks
- 10
- Avg merge
- 9d 15h
- Merged PRs (30d)
- 3
Description
The current proposal for container timing expands on element timing:
- You apply a
containertimingattribute to a node, giving it anid - You can also optionally apply settings to a sub-tree: ignore, transparent, shadowed.
But this sort of creates a single global perspective that all observers of the page timings must agree to.
For example, if a parent node opts to observe child timings, but then any child also opts to observe its own timings, right now the default proposal is to hide these timings from the parent container. This might be surprising if the two attributes aren't explicitly assigned by the same author.
(I think its potentially even worse with the ignore setting where this is decided globally).
There might also be differences of opinion of how to even construct the container timing "tree".
For example, a hypothetical future LCP algorithm might want to apply some default container timing setting for specific nodes (tables, svg, etc), but ignore all others.
This might differ than shape of the tree from an explicit opt-in from a site owner. And that might differ further from the default settings of a "custom component library" that measures timings for its components. Etc.
Proposal: could it be possible to establish the shape of the container tree, and settings (like transparent, shadowed, ignore) to specific observers of element timing, rather than applied directly to the dom nodes?
Another potential advantage of this might be: you can publish a dom with data-* attributes which help define container relationships, but this wouldn't actually do anything until an Observer is registered.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by reading the current containertiming proposal and the element timing behavior it extends. Compare the global DOM-node settings with the proposed observer-specific tree and settings model, and consider the work complete when the observer scope and handling of ignore, transparent, and shadowed are explicitly resolved.
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
- Mostly clear
- Newbie friendliness
- 25/100