coderef

iterationCompositeLimited availability

The iterationComposite property of a KeyframeEffect object sets whether an animation's iterations are calculated independently ("replace") or are accumulated with the value of the previous iteration ("accumulate").

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
✕Not supportedup to 155
Current: 155
Edge
✕Not supportedup to 154
Current: 154
Firefox
1–79Not supported
80+Supportedsince Aug 25, 2020
Current: 157
Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
4–79Not supported
80+Supportedsince Aug 31, 2020
Current: 157
Safari iOS
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27

How to use

Not supported in Chrome, Edge, Chrome Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: iterationComposite.

Feature detection

JS · check before using
if ("KeyframeEffect" in globalThis && "iterationComposite" in KeyframeEffect.prototype) {
  // KeyframeEffect.iterationComposite is available
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Element.animate.options_iterationComposite_parameter✕✕8016.4✕8016.4
KeyframeEffect.iterationComposite✕✕8016.4✕8016.4