AnimationEffectTimingReadOnly.iterationStart

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

The iterationStart property of AnimationEffectTimingReadOnly represents which repetition the animation begins at and its progress through it.

Note: In AnimationEffectTiming, a mutable subclass of AnimationEffectTimingReadOnly used withKeyframeEffects, the property acts as both a getter and a setter.

Syntax

// Getting the iterationStart
var animationStartingPoint = animation.effect.timing.iterationStart;

// Setting the iterationStart 
animation.effect.timing.iterationStart = 5.9;

Value

A floating-point value whose value is at least 0 and is not +Infinity, indicating the offset into the number of iterations the animation sequence is to run at which to start animating. iterationStart represents the iteration index at which the animation effect begins as well as its progress through that iteration.

Usually you'll use a value between 0.0 and 1.0 to indicate an offset into the first run of the animation at which to begin the animation performance, but any positive, non-infinite value is allowed. Since all animations' iteration indexes start at 0, a value of 0.5 would start the animation halfway through its first iteration or loop. Meanwhile, a value of 1.2 means the animation will begin playback 20% of the way through its second iteration, and so forth.

It's currently undefined what happens if you specify a value of iterationStart which is greater than the value of AnimationEffectTimingProperties.iterations. See issue 170 in the Web Animations API specification's issue tracker for details and status of any changes to the specification in this regard.

Specifications

Specification Status Comment
Web Animations
The definition of 'AnimationEffectTimingReadOnly.iterationStart' in that specification.
Working Draft Editor's draft.

Browser compatibility

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

1. The preference is set to true by default on Firefox Nightly and on Firefox Developer Edition, but not on the official release.

2. From version 45: this feature is behind the dom.animations-api.core-enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

Document Tags and Contributors

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