Skip to content

[web-animations-1][scroll-animations-1] Animations on inactive timelines should still become ready #9256

Open
@flackr

Description

@flackr

web-animations-1 section 4.5.6 says

An animation is ready at the first moment where both of the following conditions are true:

Per scroll-animations-1 section 2.1, there are conditions during which a scroll or view timeline can be inactive (e.g. the scroller is not currently scrollable) but may become active as a result of a user action, e.g. resizing the browser window such that the scroller is visible.

As a result of the second condition above, an animation using an inactive timeline is not considered to be "ready" until the scroll range is available. E.g. if you load the following demo the animation becomes ready once the viewport is smaller than the black box: https://jsbin.com/xezuluc/edit?js,output

This seems counter-intuitive to me. As a developer I would expect animations to become ready once the setup was complete, but not to be indefinitely delayed. E.g. a start delay on a time-based animation does not delay the ready promise. As it is currently implemented, it's not safe to wait on animation ready promises even though the effect is as ready as it can be on the next rendered frame. I think a developer would expect the animation ready promise to resolve once the animation has entered its current stable state.

@birtles, do you know why we have this condition? Would it be reasonable to remove it? I'm not sure which particular cases it is trying to cover.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions