Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
flackr opened this issue Sep 17, 2019 · 0 comments

Comments

@flackr
Copy link
Contributor

flackr commented Sep 17, 2019

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?

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

No branches or pull requests

1 participant