Victor Porof | 6e09692 | 2022-06-10 13:01:05 +0000 | [diff] [blame] | 1 | // GENERATED CONTENT - DO NOT EDIT |
| 2 | // Content was automatically extracted by Reffy into webref |
| 3 | // (https://github.com/w3c/webref) |
| 4 | // Source: Web Animations (https://drafts.csswg.org/web-animations-1/) |
| 5 | |
| 6 | [Exposed=Window] |
| 7 | interface AnimationTimeline { |
| 8 | readonly attribute double? currentTime; |
| 9 | readonly attribute TimelinePhase phase; |
| 10 | }; |
| 11 | |
| 12 | dictionary DocumentTimelineOptions { |
| 13 | DOMHighResTimeStamp originTime = 0; |
| 14 | }; |
| 15 | |
| 16 | [Exposed=Window] |
| 17 | interface DocumentTimeline : AnimationTimeline { |
| 18 | constructor(optional DocumentTimelineOptions options = {}); |
| 19 | }; |
| 20 | |
| 21 | [Exposed=Window] |
| 22 | interface Animation : EventTarget { |
| 23 | constructor(optional AnimationEffect? effect = null, |
| 24 | optional AnimationTimeline? timeline); |
| 25 | attribute DOMString id; |
| 26 | attribute AnimationEffect? effect; |
| 27 | attribute AnimationTimeline? timeline; |
| 28 | attribute double playbackRate; |
| 29 | readonly attribute AnimationPlayState playState; |
| 30 | readonly attribute AnimationReplaceState replaceState; |
| 31 | readonly attribute boolean pending; |
| 32 | readonly attribute Promise<Animation> ready; |
| 33 | readonly attribute Promise<Animation> finished; |
| 34 | attribute EventHandler onfinish; |
| 35 | attribute EventHandler oncancel; |
| 36 | attribute EventHandler onremove; |
| 37 | undefined cancel(); |
| 38 | undefined finish(); |
| 39 | undefined play(); |
| 40 | undefined pause(); |
| 41 | undefined updatePlaybackRate(double playbackRate); |
| 42 | undefined reverse(); |
| 43 | undefined persist(); |
| 44 | undefined commitStyles(); |
| 45 | }; |
| 46 | |
| 47 | enum AnimationPlayState { "idle", "running", "paused", "finished" }; |
| 48 | |
| 49 | enum AnimationReplaceState { "active", "removed", "persisted" }; |
| 50 | |
| 51 | enum TimelinePhase { "inactive", "before", "active", "after" }; |
| 52 | |
| 53 | [Exposed=Window] |
| 54 | interface AnimationEffect { |
| 55 | EffectTiming getTiming(); |
| 56 | ComputedEffectTiming getComputedTiming(); |
| 57 | undefined updateTiming(optional OptionalEffectTiming timing = {}); |
| 58 | }; |
| 59 | |
| 60 | dictionary EffectTiming { |
| 61 | double delay = 0; |
| 62 | double endDelay = 0; |
| 63 | FillMode fill = "auto"; |
| 64 | double iterationStart = 0.0; |
| 65 | unrestricted double iterations = 1.0; |
| 66 | PlaybackDirection direction = "normal"; |
| 67 | DOMString easing = "linear"; |
| 68 | }; |
| 69 | |
| 70 | dictionary OptionalEffectTiming { |
| 71 | double delay; |
| 72 | double endDelay; |
| 73 | FillMode fill; |
| 74 | double iterationStart; |
| 75 | unrestricted double iterations; |
| 76 | (unrestricted double or DOMString) duration; |
| 77 | PlaybackDirection direction; |
| 78 | DOMString easing; |
| 79 | }; |
| 80 | |
| 81 | enum FillMode { "none", "forwards", "backwards", "both", "auto" }; |
| 82 | |
| 83 | enum PlaybackDirection { "normal", "reverse", "alternate", "alternate-reverse" }; |
| 84 | |
| 85 | dictionary ComputedEffectTiming : EffectTiming { |
| 86 | double? progress; |
| 87 | unrestricted double? currentIteration; |
| 88 | }; |
| 89 | |
| 90 | [Exposed=Window] |
| 91 | interface KeyframeEffect : AnimationEffect { |
| 92 | constructor(Element? target, |
| 93 | object? keyframes, |
| 94 | optional (unrestricted double or KeyframeEffectOptions) options = {}); |
| 95 | constructor(KeyframeEffect source); |
| 96 | attribute Element? target; |
| 97 | attribute CSSOMString? pseudoElement; |
| 98 | attribute CompositeOperation composite; |
| 99 | sequence<object> getKeyframes(); |
| 100 | undefined setKeyframes(object? keyframes); |
| 101 | }; |
| 102 | |
| 103 | dictionary BaseComputedKeyframe { |
| 104 | double? offset = null; |
| 105 | double computedOffset; |
| 106 | DOMString easing = "linear"; |
| 107 | CompositeOperationOrAuto composite = "auto"; |
| 108 | }; |
| 109 | |
| 110 | dictionary BasePropertyIndexedKeyframe { |
| 111 | (double? or sequence<double?>) offset = []; |
| 112 | (DOMString or sequence<DOMString>) easing = []; |
| 113 | (CompositeOperationOrAuto or sequence<CompositeOperationOrAuto>) composite = []; |
| 114 | }; |
| 115 | |
| 116 | dictionary BaseKeyframe { |
| 117 | double? offset = null; |
| 118 | DOMString easing = "linear"; |
| 119 | CompositeOperationOrAuto composite = "auto"; |
| 120 | }; |
| 121 | |
| 122 | dictionary KeyframeEffectOptions : EffectTiming { |
| 123 | CompositeOperation composite = "replace"; |
| 124 | CSSOMString? pseudoElement = null; |
| 125 | }; |
| 126 | |
| 127 | enum CompositeOperation { "replace", "add", "accumulate" }; |
| 128 | |
| 129 | enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" }; |
| 130 | |
| 131 | interface mixin Animatable { |
| 132 | Animation animate(object? keyframes, |
| 133 | optional (unrestricted double or KeyframeAnimationOptions) options = {}); |
| 134 | sequence<Animation> getAnimations(optional GetAnimationsOptions options = {}); |
| 135 | }; |
| 136 | |
| 137 | dictionary KeyframeAnimationOptions : KeyframeEffectOptions { |
| 138 | DOMString id = ""; |
| 139 | AnimationTimeline? timeline; |
| 140 | }; |
| 141 | |
| 142 | dictionary GetAnimationsOptions { |
| 143 | boolean subtree = false; |
| 144 | }; |
| 145 | |
| 146 | partial interface Document { |
| 147 | readonly attribute DocumentTimeline timeline; |
| 148 | }; |
| 149 | |
| 150 | partial interface mixin DocumentOrShadowRoot { |
| 151 | sequence<Animation> getAnimations(); |
| 152 | }; |
| 153 | |
| 154 | Element includes Animatable; |