Skip to content

[web-animations-1] Consider allowing seeking currentTime from resolved to unresolved #4323

Open
@flackr

Description

@flackr

web-animations section 4.4.5 of the spec says that:

  1. If seek time is an unresolved time value, then perform the following steps.
    1. If the current time is resolved, then throw a TypeError

In the ScrollTimeline spec, scroll-animations section 3.1.4 the current time can go from resolved to unresolved if the ScrollTimeline does not have fill: both. For the ScrollTimeline polyfill, I implemented this transition by canceling the animation

    if (currentTime == null) {
      if (animations[i].playState == 'paused')
        animations[i].cancel();
    } else {
      animations[i].currentTime = currentTime;
    }

However, if transitioning from resolved to unresolved is expected behavior, I think that we should allow seeking to unresolved time values. Of course, doing so may be equivalent to canceling the animation?

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