AnimationEvent

U leest de Engelstalige versie van deze inhoud, omdat er nog geen vertaling voor deze taal beschikbaar is. Help ons dit artikel te vertalen!

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 AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
AnimationEvent
Experimental
Chrome Full support 43
Full support 43
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Full support YesFirefox Full support 6IE Full support 10Opera Full support 30
Prefixed
Full support 30
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Full support 12.1
Full support 12
Prefixed
Prefixed Implemented with the vendor prefix: o
Safari Full support 9.1
Full support 9.1
Full support 4
Prefixed
Prefixed Implemented with the vendor prefix: webkit
WebView Android Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Chrome Android Full support 43
Full support 43
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Firefox Android Full support 6Opera Android Full support 30
Prefixed
Full support 30
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Full support 12.1
Full support 12
Prefixed
Prefixed Implemented with the vendor prefix: o
Safari iOS Full support 9.3
Full support 9.3
Full support 3.2
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Samsung Internet Android Full support 4.0
Full support 4.0
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
AnimationEvent
Experimental
Chrome Full support 43Edge ? Firefox Full support 23IE No support NoOpera No support NoSafari No support NoWebView Android Full support 43Chrome Android Full support 43Firefox Android Full support 23Opera Android No support NoSafari iOS ? Samsung Internet Android Full support 4.0
animationName
Experimental
Chrome Full support 43Edge Full support 12Firefox Full support 6IE Full support 10Opera Full support YesSafari Full support 9WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung 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 43Firefox Android Full support 6Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
initAnimationEvent
ExperimentalDeprecatedNon-standard
Chrome No support ? — 18
Alternate Name
No support ? — 18
Alternate Name
Alternate Name Uses the non-standard name: initWebKitAnimationEvent
Edge No support 12 — 16Firefox No support 6 — 23IE Full support 10Opera No support 12.1 — 15Safari No support ? — 6
Alternate Name
No support ? — 6
Alternate Name
Alternate Name Uses the non-standard name: initWebKitAnimationEvent
WebView Android No support NoChrome Android No support NoFirefox Android No support 6 — 23Opera Android No support ? — 14Safari iOS No support ? — 6
Alternate Name
No support ? — 6
Alternate Name
Alternate Name Uses the non-standard name: initWebKitAnimationEvent
Samsung Internet Android No support No
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 68Firefox 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.
Uses a non-standard name.
Uses a non-standard name.
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

See also