This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The AnimationEffectTiming interface of the Web Animations API is comprised of timing properties. It is returned by the timing attribute of a KeyframeEffect.
This interface inherits its properties from AnimationEffectTimingReadOnly, but in a non-read only form.
This interface inherits its properties from its parent, AnimationEffectTimingReadOnly, in a non-read only form.
AnimationEffectTimingReadOnly.delay0.AnimationEffectTimingReadOnly.endDelay0.AnimationEffectTimingReadOnly.fillbackwards), retained after the animation has completed playing (forwards), or both. Defaults to none.AnimationEffectTimingReadOnly.iterationStartAnimationEffectTimingReadOnly.iterations1, and can also take a value of infinity to make it repeat infinitely.AnimationEffectTimingReadOnly.duration0.AnimationEffectReadOnly.directionnormal), backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse). Defaults to normal.AnimationEffectTimingReadOnly.easinglinear, ease, ease-in, ease-out, and ease-in-out, or a custom cubic-bezier value like cubic-bezier(0.42, 0, 0.58, 1). Defaults to linear.In the Growing and Shrinking Alice example, we set Alice's animation — aliceChange — at halfway complete by getting the duration of its effect's timing attribute, which returns an AnimationEffectTiming object:
aliceChange.currentTime = aliceChange.effect.timing.duration / 2 ;
| Specification | Status | Comment |
|---|---|---|
| Web Animations The definition of 'AnimationEffectTiming' in that specification. | Working Draft | Editor's draft. |
| Feature | Chrome | Firefox (Gecko) | Microsoft Edge | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|---|
| Basic support | No support | 48 (48)[1] | ? | No support | (Yes) | No support |
| Feature | Android | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|---|---|
| Basic support | ? | ? | ? | 48.0 (48)[1] | ? | No support | No support | No support |
[1] The Web Animations API is only enabled by default in Firefox Developer Edition and Nightly builds. You can enable it in beta and release builds by setting the preference dom.animations-api.core.enabled to true, and can disable it in any Firefox version by setting this preference to false.
KeyframeEffectAnimationEffectTimingReadOnly
© 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/AnimationEffectTiming