We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


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

The getComputedTiming() method of the AnimationEffectReadOnly interface returns the calculated timing properties for this animation effect.

Although many of the attributes of the returned object are common to the AnimationEffectTimingReadOnly contained in the object returned by the AnimationEffectReadOnly.timing attribute, the values returned by this object differ in the following ways:

Returns the calculated value of the iteration duration. If AnimationEffectTimingReadOnly.duration is the string auto, this attribute will return 0.
The auto value is replaced with the appropriate AnimationEffectTimingReadOnly.fill value.

These values are comparable to the computed styles of an Element returned using window.getComputedStyle(elem).


var currentTimeValues = animation.getComputedTiming();



Return Value

A ComputedTimingProperties dictionary object, which contains the following properties:

The end time of the animation in milliseconds from the animation's start (if the KeyframeEffect is associated with an Animation). (Also includes AnimationEffectTimingReadOnly.endDelay in that calculation.)
The length of time in milliseconds that the animation's effects will run. This is equal to the iteration duration multiplied by the iteration count.
The current time of the animation in milliseconds. If the KeyframeEffect is not associated with an Animation, its value is null.
Indicates how far along the animation is through its current iteration with values between 0 and 1. Returns null if the animation is not running or its KeyframeEffect isn't associated with an Animation.
The number of times this animation has looped, starting from 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 'AnimationEffectReadOnly.getComputedTiming()' in that specification.
Working Draft Editor's draft.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes No No No Yes No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes No No Yes No ?

See also

Document Tags and Contributors

 Contributors to this page: fscholz, birtles, rachelnabors, chrisdavidmills
 Last updated by: fscholz,