HTML onanimationiteration Event Attribute
Description
The onanimationiteration event attribute runs a script when a CSS animation finishes one iteration and starts the next. It does not fire at the end of the last iteration (that fires animationend), so an animation that runs only once never fires it.
The event is an AnimationEvent with the properties animationName (the name of the @keyframes rule), elapsedTime (in seconds, not counting animation-delay) and pseudoElement (for example "::before"). Animation events bubble, so one handler on a parent can watch all of its children; check event.target to see which element is animating.
Syntax
<element onanimationiteration="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML onanimationiteration event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
Desktop





Tablets & Mobile





