Element timing entries returns both an element and an id for its timings.
LCP timing entries also have id, but typically juts "".
Container Timing right now, same as element timing, uses "id assignment" as the opt-in mechanism. But often this just leads to generating random identifiers for many use cases, or name clashes.
Consider an alternative:
- Perhaps any
containertiming-nesting strategy should suffice to opt-in for container-timing (nesting implies this is, itself, a container).
elementtiming="id" could still be used to assign an explicit id
element is returned to help identify the container, but might be null.
- We can solve for that case by including a querySelector value (this would be a separate feature request for all element timings, a common request), (or the developer can assign an id)
- This also removes the need to have "default" strategies for nesting
Element timing entries returns both an
elementand anidfor its timings.LCP timing entries also have
id, but typically juts"".Container Timing right now, same as element timing, uses "id assignment" as the opt-in mechanism. But often this just leads to generating random identifiers for many use cases, or name clashes.
Consider an alternative:
containertiming-nestingstrategy should suffice to opt-in for container-timing (nesting implies this is, itself, a container).elementtiming="id"could still be used to assign an explicitidelementis returned to help identify the container, but might be null.