Finish/Destroy a Infinity animation
jdnichollsc opened this issue · 4 comments
jdnichollsc commented
Hello guys!
I was wondering if is possible to finish/destroy an animation with iterations equal to Infinity
Thanks in advance!
Martin-Pitt commented
If the target effect end is infinity, it's supposed to throw an Invalid State Error, per step 1 in the algorithm for finishing an animation:
https://www.w3.org/TR/web-animations-1/#finishing-an-animation-section
target effect end:
The target effect end of an animation is equal to the end time of the animation’s target effect.
An end in infinity is not finishable.
jdnichollsc commented
So is cancel the right way to do that?
Martin-Pitt commented
Yep, cancel is the right method to get rid off the animation.
jdnichollsc commented
Thanks for your help and for your time, it's working as expected now https://proyecto26.com/animatable-component/