Skip to content

How to set a nested strategy #3

Open

Description

@jasonwilliams

Currently there's no straight forward way to set a nested strategy for ContainerTiming as the PerformanceObserver doesn't accept options. This may need to be a new field on PerformanceObserverInit

Activity

  1. jdapena commented on Feb 13, 2025

    @jdapena
    Contributor

    The proposal with PerformanceObserverInit has two problems:

    • It requires to change PerformanceObserverInit to add the new fields. This is shared with other timing events and would get a new field that is only usable for ContainerTiming.
    • We cannot know the nesting policy when the events are happening. So, when painting happens, and the information is stored, we need to store all the information for the 3 nesting modes.

    As a solution I am proposing (and implementing) a new approach that consist of defining a new attribute, containertiming-nesting for specifying the policy. This attribute gets the same values discussed before (ignore, transparent, shadowed). This way, when a paint needs to be processed, we already know the propagation rules, so we can immediately register the paint in all the roots that expect the value.

  2. jasonwilliams commented on Nov 5, 2025

    @jasonwilliams
    CollaboratorAuthor
  3. jdapena commented on Aug 14, 2026

    @jdapena
    Contributor

    Final nested strategy has been landed already:

    • containertiming always propagates to parents (so paints are propagated to all containertiming root ancestors.
    • containertimingignore blocks propagation to parents.

    The old containertiming-nesting attribute is gone.

    I don't have permission to close this. @jasonwilliams < Could you close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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