This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
The Animation
.currentTime
property returns or sets the current time of the animation if it is running, or null if the animation is paused.
SyntaxEdit
var currentTime = element.currentTime; element.currentTime = someValue;
SpecificationsEdit
Specification | Status | Comment |
---|---|---|
Web Animations The definition of 'currentTime' in that specification. |
Working Draft |
Browser compatibilityEdit
[1] This feature is not enabled by default, the preference dom.animations-api.core.enabled
must be set to true
. Before Firefox 39, it was not possible to set the current time. Before Firefox 40, this property was implemented on the AnimationPlayer
interface.
See alsoEdit
AnimationPlayer
for other methods and properties you can use to control web page animation.AnimationPlayer.startTime
for the time a player is scheduled to start.