AnimationEvent objects provide information about events that occur related to CSS animations.
| || ||The name of the animation on which the animation event occurred.|
| || ||The amount of time, in seconds, the animation had been running at the time the event occurred.|
Initializes the animation event.
void initAnimationEvent( in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString propertyNameArg, in float elapsedTimeArg );
- A string identifying the specific type of animation event that occurred. See Animation event types below for details.
trueof the event can bubble, otherwise
trueif the event's default action can be prevented; otherwise
- The name of the animation that generated the event; this is the same as the value of the
animation-nameproperty on the element that's animating.
- The amount of time, in seconds, since the animation began, at which the event was created.
Animation event types
The following types of events can be fired by CSS animations; these strings are the possible values of the
value on the delivered event.
- Sent when the animation begins. The
elapsedTimeattribute's value will be 0.
- Sent when the animation ends.
- Sent at the end of each iteration of an animation for which
animation-iteration-countis greater than one; this event isn't fired for animations with an iteration count of one.
All of these events can be canceled, and can bubble.