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

I think there are issues with immediately committing the end value when you have composite animations:

```js
animA = element.animate(
    {transform: ['translateX(0)', 'translateX(500px)']},
    {duration: 5000, composite: 'add'});
animA.commitStyles(); // element.style.transform = 'translateX(500px)';
```

Now the effect is animating from 500px to 1000px?

This is why in #5475 I proposed we don't commit immediately but rather commit the style change when the animation finishes (on an infinitely precise timeline which is conceptually identical to filling forwards).

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


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

Received on Friday, 28 August 2020 14:55:00 UTC