Re: [csswg-drafts] [web-animations] Could commitStyles always write the end state of the animation? (#5394)

It seems like what this case needs is something like:

```js
function finishTransition(anim) {
  // Make sure finish() seeks to the target effect end
  anim.playbackRate = 1;
  anim.finish();
  anim.effect.updateTiming({ fill: 'both' }); // Or 'forwards'
  anim.commitStyles();
  anim.cancel();
}
```

I wonder how common this pattern is or if there are similar patterns?

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5394#issuecomment-672394173 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 12 August 2020 00:27:58 UTC