Skip to content

KeyframeEffect

Generated from idl/web-animations.webidl when the site was built at 7aa23e2.

KeyframeEffect is an interface in idl/web-animations.webidl, inheriting AnimationEffect, exposed in Window. What it does is on MDN; this page says what niso has of it.

Keyframes cross flattened: for each keyframe its offset (“” for null), easing, composite and property count, then property, value pairs. Those going in name CSS properties; those coming out, from keyframes(), add the computed offset after the offset and name IDL attributes.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
Web animations Widely available Partial 91% 3301 of 3589 subtests pass 7
constructor
[NisoGlue] constructor(Element? target, object? keyframes, optional (unrestricted double or KeyframeEffectOptions) options = {});
attribute
attribute Element? target;
int32_t niso_keyframe_effect_get_target(niso_dom* dom, niso_handle self, niso_handle* out);
int32_t niso_keyframe_effect_set_target(niso_dom* dom, niso_handle self, niso_handle value);
attribute
attribute DOMString? pseudoElement;
int32_t niso_keyframe_effect_get_pseudo_element(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_keyframe_effect_set_pseudo_element(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
attribute CompositeOperation composite;
int32_t niso_keyframe_effect_get_composite(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_keyframe_effect_set_composite(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
operation
[NisoGlue] sequence<object> getKeyframes();
operation
[NisoGlue] undefined setKeyframes(object? keyframes);
static operation not in JS
[NisoInternal] static KeyframeEffect create(Element? target);
int32_t niso_keyframe_effect_create(niso_dom* dom, niso_handle target, niso_handle* out);
static operation not in JS
[NisoInternal] static KeyframeEffect copy(KeyframeEffect source);
int32_t niso_keyframe_effect_copy(niso_dom* dom, niso_handle source, niso_handle* out);
operation not in JS
[NisoInternal] sequence<DOMString> keyframes();
int32_t niso_keyframe_effect_keyframes(niso_dom* dom, niso_handle self, niso_strs* out);
operation not in JS
[NisoInternal] undefined replaceKeyframes(sequence<DOMString> keyframes);
int32_t niso_keyframe_effect_replace_keyframes(niso_dom* dom, niso_handle self, const niso_str* keyframes, size_t keyframes_len);
static operation not in JS
[NisoInternal] static DOMString? propertyName(DOMString attribute);
int32_t niso_keyframe_effect_property_name(niso_dom* dom, const char* attribute, size_t attribute_len, niso_str* out);

The animatable CSS property an IDL attribute name in a keyframe names, or null.

static operation not in JS
[NisoInternal] static undefined checkEasing(DOMString easing);
int32_t niso_keyframe_effect_check_easing(niso_dom* dom, const char* easing, size_t easing_len);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • iterationComposite (iterationComposite)