Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

AnimationEffectTimingReadOnly.delay

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage 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 specification changes.

The delay property of the AnimationEffectTimingReadOnly object represents the number of milliseconds to delay the start of the animation.

Note: In AnimationEffectTiming, a mutable subclass of AnimationEffectTimingReadOnly used withKeyframeEffects, the property acts as both a getter and a setter.

Syntax

// Getting the delay in milliseconds
var animationDelay = animation.effect.timing.delay;

// Setting the delay in milliseconds 
animation.effect.timing.delay = 200;

Value

A number representing milliseconds. Defaults to 0.

Examples

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();

Specifications

Specification Status Comment
Web Animations
The definition of 'AnimationEffectTimingReadOnly.delay' in that specification.
Working Draft Editor's draft.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) 48 (48) 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 ? ? ? ? ? No support No support No support

See also

Document Tags and Contributors

 Contributors to this page: rachelnabors, chrisdavidmills
 Last updated by: rachelnabors,