W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

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

From: Brian Birtles via GitHub <sysbot+gh@w3.org>
Date: Wed, 12 Aug 2020 00:27:55 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-672394173-1597192074-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC