delay property of the
AnimationEffectTimingReadOnly object represents the number of milliseconds to delay the start of the animation.
// Getting the delay in milliseconds var animationDelay = animation.effect.timing.delay; // Setting the delay in milliseconds animation.effect.timing.delay = 200;
A number specifying the delay, in milliseconds, from the start of the animation's play cycle to the beginning of its active interval (the time index at which actual animation begins). Defaults to 0.
In the Growing and Shrinking Alice example, we set a delay of 2000 milliseconds (2 seconds) on an animation that shows a "game over" tile. At the end of the game, for two seconds a vignette is shown before the "game over" interface appears. Below you can see that even though we call
play() immediately after setting the delay, the animation will wait two second before begining:
bringUI.effect.timing.delay = 2000; bringUI.play();
The definition of 'AnimationEffectTimingReadOnly.delay' in that specification.
|Working Draft||Editor's draft.|
|Feature||Android webview||Chrome for Android||Edge mobile||Firefox for Android||Opera Android||iOS Safari||Samsung Internet|
|Basic support||?||?||?||451 2||No||No||?|
1. The preference is set to
true by default on Firefox Nightly and on Firefox Developer Edition, but not on the official release.
2. From version 45: this feature is behind the
dom.animations-api.core-enabled preference (needs to be set to
true). To change preferences in Firefox, visit about:config.