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.
Syntax
var currentTime = element.currentTime; element.currentTime = someValue;
Specifications
Specification | Status | Comment |
---|---|---|
Web Animations The definition of 'currentTime' in that specification. |
Working Draft |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 39.0 | 36 (36) [1] | Not supported | Not supported | Not supported |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | (Yes) | 36 (36) [1] | Not supported | Not supported | Not supported |
[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 also
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.