Animation
Generated from idl/web-animations.webidl when the site was built at 7aa23e2.
Animation is an interface in idl/web-animations.webidl, inheriting EventTarget, exposed in Window. What it does is on MDN; this page says what niso has of it.
The ready and finished promises cross as (generation, state) pairs: the glue makes a promise per generation and settles it when the hook reports that generation settled.
Status
Section titled “Status”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 | 24 |
Members
Section titled “Members”constructor
Section titled “constructor”[NisoGlue] constructor(optional AnimationEffect? effect = null, optional AnimationTimeline? timeline);attribute DOMString id;int32_t niso_animation_get_id(niso_dom* dom, niso_handle self, niso_str* out);int32_t niso_animation_set_id(niso_dom* dom, niso_handle self, const char* value, size_t value_len);effect
Section titled “effect”attribute AnimationEffect? effect;int32_t niso_animation_get_effect(niso_dom* dom, niso_handle self, niso_handle* out);int32_t niso_animation_set_effect(niso_dom* dom, niso_handle self, niso_handle value);timeline
Section titled “timeline”attribute AnimationTimeline? timeline;int32_t niso_animation_get_timeline(niso_dom* dom, niso_handle self, niso_handle* out);int32_t niso_animation_set_timeline(niso_dom* dom, niso_handle self, niso_handle value);startTime
Section titled “startTime”[NisoGlue] attribute double? startTime;currentTime
Section titled “currentTime”[NisoGlue] attribute double? currentTime;playbackRate
Section titled “playbackRate”attribute double playbackRate;int32_t niso_animation_get_playback_rate(niso_dom* dom, niso_handle self, double* out);int32_t niso_animation_set_playback_rate(niso_dom* dom, niso_handle self, double value);playState
Section titled “playState”readonly attribute AnimationPlayState playState;int32_t niso_animation_get_play_state(niso_dom* dom, niso_handle self, niso_str* out);replaceState
Section titled “replaceState”readonly attribute AnimationReplaceState replaceState;int32_t niso_animation_get_replace_state(niso_dom* dom, niso_handle self, niso_str* out);pending
Section titled “pending”readonly attribute boolean pending;int32_t niso_animation_get_pending(niso_dom* dom, niso_handle self, bool* out);[NisoGlue] readonly attribute Promise<Animation> ready;finished
Section titled “finished”[NisoGlue] readonly attribute Promise<Animation> finished;onfinish
Section titled “onfinish”attribute EventHandler onfinish;int32_t niso_animation_get_onfinish(niso_dom* dom, niso_handle self, void** out);int32_t niso_animation_set_onfinish(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);oncancel
Section titled “oncancel”attribute EventHandler oncancel;int32_t niso_animation_get_oncancel(niso_dom* dom, niso_handle self, void** out);int32_t niso_animation_set_oncancel(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);onremove
Section titled “onremove”attribute EventHandler onremove;int32_t niso_animation_get_onremove(niso_dom* dom, niso_handle self, void** out);int32_t niso_animation_set_onremove(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);cancel()
Section titled “cancel()”undefined cancel();int32_t niso_animation_cancel(niso_dom* dom, niso_handle self);finish()
Section titled “finish()”undefined finish();int32_t niso_animation_finish(niso_dom* dom, niso_handle self);play()
Section titled “play()”undefined play();int32_t niso_animation_play(niso_dom* dom, niso_handle self);pause()
Section titled “pause()”undefined pause();int32_t niso_animation_pause(niso_dom* dom, niso_handle self);updatePlaybackRate()
Section titled “updatePlaybackRate()”undefined updatePlaybackRate(double playbackRate);int32_t niso_animation_update_playback_rate(niso_dom* dom, niso_handle self, double playback_rate);reverse()
Section titled “reverse()”undefined reverse();int32_t niso_animation_reverse(niso_dom* dom, niso_handle self);persist()
Section titled “persist()”undefined persist();int32_t niso_animation_persist(niso_dom* dom, niso_handle self);commitStyles()
Section titled “commitStyles()”[CEReactions] undefined commitStyles();int32_t niso_animation_commit_styles(niso_dom* dom, niso_handle self);create()
Section titled “create()”[NisoInternal] static Animation create(AnimationEffect? effect, AnimationTimeline? timeline, boolean defaultTimeline);int32_t niso_animation_create(niso_dom* dom, niso_handle effect, niso_handle timeline, bool default_timeline, niso_handle* out);startTimeValue()
Section titled “startTimeValue()”[NisoInternal] unrestricted double startTimeValue();int32_t niso_animation_start_time_value(niso_dom* dom, niso_handle self, double* out);setStartTimeValue()
Section titled “setStartTimeValue()”[NisoInternal] undefined setStartTimeValue(unrestricted double time);int32_t niso_animation_set_start_time_value(niso_dom* dom, niso_handle self, double time);currentTimeValue()
Section titled “currentTimeValue()”[NisoInternal] unrestricted double currentTimeValue();int32_t niso_animation_current_time_value(niso_dom* dom, niso_handle self, double* out);setCurrentTimeValue()
Section titled “setCurrentTimeValue()”[NisoInternal] undefined setCurrentTimeValue(unrestricted double time);int32_t niso_animation_set_current_time_value(niso_dom* dom, niso_handle self, double time);promiseState()
Section titled “promiseState()”[NisoInternal] unsigned long promiseState(boolean finished);int32_t niso_animation_promise_state(niso_dom* dom, niso_handle self, bool finished, uint32_t* out);The current ready (or finished) promise’s generation times four, plus 0 while it is pending, 1 once fulfilled and 2 once rejected.
setPromiseHook()
Section titled “setPromiseHook()”[NisoInternal] static undefined setPromiseHook(AnimationPromiseCallback hook);int32_t niso_animation_set_promise_hook(niso_dom* dom, niso_animation_promise_callback_fn hook_fn, void* hook_userdata, niso_drop_fn hook_drop);Not in niso yet
Section titled “Not in niso yet”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.
remove_filling_animation(Web animations)