Baseline Widely available
The updateTiming()
method of the AnimationEffect
interface updates the specified timing properties for an animation effect.
timing
Optional
An object containing zero or more of the properties from the return value of AnimationEffect.getTiming()
, representing the timing properties to update.
None (undefined
).
TypeError
Thrown if invalid values are provided for any of the timing properties.
updateTiming()
may cause any associated Animation
to start or stop playing, if for example the effect of a running animation is shortened such that its end time is before Animation.currentTime
or the effect of a finished animation is lengthened such that its end time is after Animation.currentTime
.
const animation = document.body.animate([], { duration: 1000 });
animation.finish();
console.log(animation.playState); // finished
animation.effect.updateTiming({ duration: 2000 });
console.log(animation.playState); // running
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4