W3cubDocs

/Web APIs

GlobalEventHandlers.onanimationend

The onanimationend property of the GlobalEventHandlers mixin is the event handler for processing animationend events.

The animationend event fires when a CSS animation reaches the end of its active period (which is calculated as (animation-duration * animation-iteration-count) + animation-delay).

Syntax

var animEndHandler = target.onanimationend;
target.onanimationend = Function

Value

A Function to be called when an animationend event occurs indicating that a CSS animation has ended on the target, where the target object is an HTML element (HTMLElement), document (Document), or window (Window). The function receives as input a single parameter: an AnimationEvent object describing the event which occurred.

Example

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
onanimationend
81
79
43-79
Only supported on the Window interface.
81
18
51
No
68
66
30-66
Only supported on the Window interface.
9
81
79
43-79
Only supported on the Window interface.
81
79
43-79
Only supported on the Window interface.
51
59
57
30-57
Only supported on the Window interface.
9
13.0
12.0
4.0-12.0
Only supported on the Window interface.

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onanimationend