This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

effect

Property of apis/web_animations/Animationapis/web_animations/Animation

Syntax

var myEffect = myAnimation.effect;
myAnimation.effect = value;

Return Value

Returns an object of type

The effect parameter, an ECMAScript value passed to the Animation constructor or to the animate operation of the Animatable interface, may specify an EffectCallback, an AnimationEffect, a Keyframe a sequence of Keyframes, or null. However, since callback functions and dictionaries are not distinguishable in WebIDL, we define the processing of this parameter for ECMAScript here in prose.

The procedure for converting an effect to an IDL value with parameter effect is as follows:

If effect is null, Return null. If effect is a platform object that implements AnimationEffect, return the IDL value that is a reference to the that platform object. If IsCallable(effect) is true, Return the result of applying the procedure for converting an ECMAScript value to an IDL callback function type to effect using EffectCallback as the callback function type. Otherwise, Return a new KeyframeEffect object constructed passing effect as the frames parameter.