Skip to content

Review the PerformanceContainerTiming attributes names #28

@jdapena

Description

@jdapena

Currently, the PerformanceContainerTiming IDL has these attributes and functions:

From PerformanceEntry: entryType, name, startTime, duration, navigationId, toJSON(). Those are coming from other specifications, so not the scope of the discussion here.

Then, for PerformanceContainerTiming itself:

  • intersectionRect: copied from PerformanceElementTiming, the intersection of the paint rectangles in the viewport.
  • size: the area in pixels of the view port that have been painted.
  • identifier: the ID set as the parameter of the containertiming attribute. Again consistent with PerformanceElementTiming.
  • lastPaintedElement: one of the element that has been painted last. We use the element suffix for consistency with the element attribute in LCP, ICP.
  • firstRenderTime: again, for consistency with what we get in PerformanceElementTiming, the field renderTime, but this is the first render event.

And new attributes that are expected to land in the spec:

  • rootElement: the container timing root. With the suffix Element to give consistency with lastPaintedElement.

Also, we are moving to support the Paint Timing Mixin. This brings us two new attributes: paintTime and presentationTime.

Some problems:

  • identifier refers to the containertiming attribute value. But we also have the node ID. Should it be rootIdentifier?
  • Do we need the Element suffix? This was for consistency with the fact that we have the element attribute in other paint events, and to state the difference between the observed root and others.
  • The "root" concept may not be obvious. Specially if we want consistency with elementtiming where we should also offer a reference to the observed element. If we want to add to PerformanceObserver an specific API for observing only a container timing root or element timing node, then... maybe observedElement, observed or observedRoot?
  • firstRenderTime, but we do not offer a renderTime attribute, as it is always startTime. We should likely add a renderTime explicitely for consistency. Specially if we could eventually move to unify the API.
  • Should we expose, if mixin is enabled, firstPaintTime and firstPresentationTime?
  • size is not very specific. Should we rename it to something like paintedArea?
  • lastPaintedElement: should it be lastRenderedElement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions