-
Notifications
You must be signed in to change notification settings - Fork 8
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.