Description
From what I understand, Web Animations do not emit animationstart
and animationiteration
events like CSS Animations do. Would it be possible to get some clarification as to what the Web Animation alternatives to those should be?
I see there are onfinish
and oncancel
event handlers here: https://www.w3.org/TR/web-animations-1/#dom-animation-onfinish
Here is an example of what I am referring to: https://codepen.io/liamdebeasi/pen/RwwZpeZ
The top square is animated using Web Animations, and the bottom square is animated using CSS Animations. If you open up the console, notice that animationstart
and animationiteration
events fire for the CSS Animation square, but not for the Web Animation square.
It would be helpful to know when the animation has started as well as when the animation is iterating from the context of syncing animations with the rest of a user's app. Ideally I would just be able to do animation.onstart
and animation.oniteration
like I can with animation.onfinish
, but even just being able to listen for the native events would be great too.