Description
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.
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.)