- From: Robert Flack via GitHub <sysbot+gh@w3.org>
- Date: Tue, 17 Sep 2019 13:59:26 +0000
- To: public-css-archive@w3.org
flackr has just created a new issue for https://github.com/w3c/csswg-drafts:
== [web-animations-1] Consider allowing seeking currentTime from resolved to unresolved ==
[web-animations section 4.4.5](https://drafts.csswg.org/web-animations/#setting-the-current-time-of-an-animation) 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](https://wicg.github.io/scroll-animations/#current-time-algorithm) the current time can go from resolved to unresolved if the ScrollTimeline does not have `fill: both`. For the [ScrollTimeline polyfill](https://github.com/flackr/scroll-timeline), I [implemented this transition by canceling the animation](https://github.com/flackr/scroll-timeline/blob/master/scroll-timeline-base.js#L94)
```js
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?
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4323 using your GitHub account
Received on Tuesday, 17 September 2019 13:59:28 UTC