This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The AnimationEvent interface represents events providing information related to animations.

Constructor

AnimationEvent()
Creates an AnimationEvent event with the given parameters.

Properties

Also inherits properties from its parent Event.

AnimationEvent.animationName Read only
Is a DOMString containing the value of the animation-name CSS property associated with the transition.
AnimationEvent.elapsedTime Read only
Is a float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused. For an "animationstart" event, elapsedTime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedTime containing  (-1 * delay).
AnimationEvent.pseudoElement Read only
Is a DOMString, starting with '::', containing the name of the pseudo-element the animation runs on. If the animation doesn't run on a pseudo-element but on the element, an empty string: ''.

Methods

Also inherits methods from its parent Event.

AnimationEvent.initAnimationEvent()
Initializes a AnimationEvent created using the deprecated Document.createEvent("AnimationEvent") method.

Specifications

Specification Status Comment
CSS Animations
The definition of 'AnimationEvent' in that specification.
Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Experimental
Chrome Full support 43
Full support 43
Full support Yes
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge ? Firefox Full support 6IE Full support 10Opera Full support 30
Prefixed
Full support 30
Prefixed
Prefixed Requires the vendor prefix: webkit
Full support 12.1
Full support 12
Prefixed
Prefixed Requires the vendor prefix: o
Safari Full support 9.1
Full support 9.1
Full support 4
Prefixed
Prefixed Requires the vendor prefix: webkit
WebView Android Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Requires the vendor prefix: webkit
Chrome Android Full support 43
Full support 43
Full support Yes
Prefixed
Prefixed Requires the vendor prefix: webkit
Edge Mobile ? Firefox Android Full support 6Opera Android Full support 30
Prefixed
Full support 30
Prefixed
Prefixed Requires the vendor prefix: webkit
Full support 12.10
Full support 12
Prefixed
Prefixed Requires the vendor prefix: o
Safari iOS ?
Prefixed
?
Prefixed
Prefixed Requires the vendor prefix: webkit
Samsung Internet Android Full support 4.0
Full support 4.0
Full support Yes
Prefixed
Prefixed Requires the vendor prefix: webkit
AnimationEvent
Experimental
Chrome Full support 43
Full support 43
Full support Yes
Edge ? Firefox Full support 23IE No support NoOpera No support NoSafari No support NoWebView Android Full support 43
Full support 43
Full support Yes
Chrome Android Full support 43
Full support 43
Full support Yes
Edge Mobile ? Firefox Android Full support 23Opera Android No support NoSafari iOS ? Samsung Internet Android Full support 4.0
animationName
Experimental
Chrome Full support 43
Full support 43
Full support Yes
Edge Full support 12Firefox Full support 6IE Full support 10Opera Full support YesSafari Full support 9WebView Android Full support 43
Full support 43
Full support Yes
Chrome Android Full support 43
Full support 43
Full support Yes
Edge Mobile Full support YesFirefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Full support 4.0
elapsedTime
Experimental
Chrome Full support 43Edge Full support 12Firefox Full support 6IE Full support 10Opera Full support YesSafari Full support 9WebView Android Full support YesChrome Android Full support 43Edge Mobile Full support YesFirefox Android Full support 6Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
initAnimationEvent
ExperimentalDeprecatedNon-standard
Chrome Full support 1Edge No support 12 — 16Firefox No support 6 — 23IE Full support 10Opera Full support 10Safari Full support 4WebView Android Full support YesChrome Android Full support 43Edge Mobile ? Firefox Android No support 6 — 23Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support 4.0
pseudoElement
Experimental
Chrome Full support 68Edge No support NoFirefox Full support 23IE No support NoOpera No support NoSafari No support NoWebView Android Full support 68Chrome Android Full support 68Edge Mobile No support NoFirefox Android Full support 23Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

See also

Document Tags and Contributors

Last updated by: fscholz,