MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-survey

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

 

The Animation.effect property of the Web Animations API gets and sets the target effect of an animation. The target effect may be either an effect object of a type based on AnimationEffectReadOnly, such as KeyframeEffect, or null.

Syntax

var effect = Animation.effect;

Animation.effect = AnimationEffectReadOnly

Value

A AnimationEffectReadOnly object describing the target animation effect for the animation, or null to indicate no active effect.

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

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No ?481 2 No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No ?481 2 No No ?

1. This property is supported in Firefox 48 but is read-only. It became writable in Firefox 51.

2. From version 48: 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.

See also

Document Tags and Contributors

 Contributors to this page: fscholz, Sheppy, birtles, chrisdavidmills, rachelnabors
 Last updated by: fscholz,