[csswg-drafts] [web-animations-1] Should setting the startTime of a play-pending animation to `null` have side effects?

birtles has just created a new issue for https://github.com/w3c/csswg-drafts:

== [web-animations-1] Should setting the startTime of a play-pending animation to `null` have side effects? ==
Typically setting the start time of an animation should cancel any pending tasks. This provides applications with a way to synchronously seek/sync animations. Furthermore, by setting the start time to `null` applications can perform a synchronous pause.

However, if an animation is play-pending its start time will already be unresolved (`null`).

If the animation is play-pending when script sets the start time to `null` what should happen?

a. The change is redundant and should be ignored. (Seems intuitive from a JS point of view, redundant changes have no side effects.), _or_
b. The pending play task is canceled. (Currently speced behavior. Allows applications to perform a synchronous pause even in the play-pending state.)

i.e.

```js
const anim = elem.animate(...);
// anim.pending === true
// anim.startTime === null
// anim.currentTime === 0

anim.startTime = null;
// Is the animation still play-pending here?
```

(Firefox actually does (a) as an optimization but the spec says we should do (b) and I'm wondering which to fix.)

/cc @stephenmcgruer @flackr @graouts @dadaa

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2691 using your GitHub account

Received on Tuesday, 22 May 2018 05:26:42 UTC