Наші добровольці ще не переклали статтю цією мовою: Українська. Долучайтеся й допоможіть це зробити!
Ви також можете прочитати цю статтю іншою мовою: English (US).

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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support

43

Yes webkit

?610

30 webkit

12.1

12 o

9.1

4 webkit

AnimationEvent

43

Yes

?23 No No No
animationName

43

Yes

Yes610 Yes Yes
elapsedTime Yes Yes610 Yes Yes
initAnimationEvent1 ?6 — 2310104
pseudoElement No No23 No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes webkit

43

Yes webkit

?6

30 webkit

12.10

12 o

? webkit ?
AnimationEvent

43

Yes

43

Yes

?23 No ? ?
animationName

43

Yes

43

Yes

Yes ? ? ? ?
elapsedTime Yes43 Yes6 Yes Yes ?
initAnimationEvent Yes43 ?6 — 23 Yes ? ?
pseudoElement No No No23 No No ?

See also

Мітки документа й учасники

 Зробили внесок у цю сторінку: nhunzaker, jpmedley, stephaniehobson, arronei, danielnixon, teoli, Sheppy, jswisher, takahan, Jeremie, fscholz, myakura
 Востаннє оновлена: fscholz,