Web/API/Window/animationend event

From Get docs


The animationend event is fired when a CSS Animation has completed. If the animation aborts before reaching completion, such as if the element is removed from the DOM or the animation is removed from the element, the animationend event is not fired.

Bubbles Yes
Cancelable No
Interface AnimationEvent
Event handler property onanimationend

The original target for this event is the Element that had the animation applied. You can listen for this event on the Window interface to handle it in the capture or bubbling phases. For full details on this event please see the page on HTMLElement: animationend.

Examples

This example listens for the animationend event:

window.addEventListener('animationend', () => {
  console.log('Animation ended');
});

The same, but using the onanimationend event handler property:

window.onanimationend = () => {
  console.log('Animation ended');
};

See a live example of this event.

Specifications

Specification Status Comment
CSS Animations Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
animationend event

Chrome Full support 43


Full support 43


Full support 1

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Edge Full support ≤79


Full support ≤79


Full support ≤79

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Firefox

Full support Yes

IE

?

Opera

?

Safari

Full support 9

WebView Android Full support 43


Full support 43


Full support Yes

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Chrome Android Full support 43


Full support 43


Full support 18

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Firefox Android

Full support Yes

Opera Android

?

Safari iOS

Full support 9

Samsung Internet Android Full support 4.0


Full support 4.0


Full support 1.0

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
Requires a vendor prefix or different name for use.'
Requires a vendor prefix or different name for use.


See also