This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The getComputedTiming()
method of the AnimationEffect
interface returns the calculated timing properties for this animation effect.
Although many of the attributes of the returned object are common to the EffectTiming
contained in the object returned by the AnimationEffect.getTiming()
method, the values returned by this object differ in the following ways:
duration
EffectTiming.duration
is the string auto
, this attribute will return 0
.fill
auto
value is replaced with the appropriate EffectTiming.fill
value.These values are comparable to the computed styles of an Element returned using window.getComputedStyle(elem)
.
var currentTimeValues = animation.getComputedTiming();
None.
A ComputedEffectTiming
dictionary object, which contains the following properties:
KeyframeEffect
is associated with an Animation
). (Also includes EffectTiming.endDelay
in that calculation.)KeyframeEffect
is not associated with an Animation
, its value is null
.0
and 1
. Returns null
if the animation is not running or its KeyframeEffect
isn't associated with an Animation
.0
. Returns null
if the animation is not running or its KeyframeEffect
isn't associated with an Animation
.Specification | Status | Comment |
---|---|---|
Web Animations The definition of 'AnimationEffect.getComputedTiming()' in that specification. | Working Draft | Editor's draft. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | ? | ? | 63 | ? | ? | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | ? | ? | ? | 63 | ? | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getComputedTiming