1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "EventTarget",
9 extends = "::js_sys::Object",
10 js_name = "Animation",
11 typescript_type = "Animation"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `Animation` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
19 pub type Animation;
20 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "id")]
21 #[doc = "Getter for the `id` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/id)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
26 pub fn id(this: &Animation) -> ::alloc::string::String;
27 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "id")]
28 #[doc = "Setter for the `id` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/id)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
33 pub fn set_id(this: &Animation, value: &str);
34 #[cfg(feature = "AnimationEffect")]
35 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "effect")]
36 #[doc = "Getter for the `effect` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/effect)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`*"]
41 pub fn effect(this: &Animation) -> Option<AnimationEffect>;
42 #[cfg(feature = "AnimationEffect")]
43 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "effect")]
44 #[doc = "Setter for the `effect` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/effect)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`*"]
49 pub fn set_effect(this: &Animation, value: Option<&AnimationEffect>);
50 #[cfg(feature = "AnimationTimeline")]
51 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "timeline")]
52 #[doc = "Getter for the `timeline` field of this object."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/timeline)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationTimeline`*"]
57 pub fn timeline(this: &Animation) -> Option<AnimationTimeline>;
58 #[cfg(feature = "AnimationTimeline")]
59 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "timeline")]
60 #[doc = "Setter for the `timeline` field of this object."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/timeline)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationTimeline`*"]
65 pub fn set_timeline(this: &Animation, value: Option<&AnimationTimeline>);
66 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "startTime")]
67 #[doc = "Getter for the `startTime` field of this object."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/startTime)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
72 pub fn start_time(this: &Animation) -> Option<f64>;
73 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "startTime")]
74 #[doc = "Setter for the `startTime` field of this object."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/startTime)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
79 pub fn set_start_time(this: &Animation, value: Option<f64>);
80 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "currentTime")]
81 #[doc = "Getter for the `currentTime` field of this object."]
82 #[doc = ""]
83 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/currentTime)"]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
86 pub fn current_time(this: &Animation) -> Option<f64>;
87 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "currentTime")]
88 #[doc = "Setter for the `currentTime` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/currentTime)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
93 pub fn set_current_time(this: &Animation, value: Option<f64>);
94 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "playbackRate")]
95 #[doc = "Getter for the `playbackRate` field of this object."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/playbackRate)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
100 pub fn playback_rate(this: &Animation) -> f64;
101 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "playbackRate")]
102 #[doc = "Setter for the `playbackRate` field of this object."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/playbackRate)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
107 pub fn set_playback_rate(this: &Animation, value: f64);
108 #[cfg(feature = "AnimationPlayState")]
109 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "playState")]
110 #[doc = "Getter for the `playState` field of this object."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/playState)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationPlayState`*"]
115 pub fn play_state(this: &Animation) -> AnimationPlayState;
116 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "pending")]
117 #[doc = "Getter for the `pending` field of this object."]
118 #[doc = ""]
119 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/pending)"]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
122 pub fn pending(this: &Animation) -> bool;
123 #[wasm_bindgen(catch, method, getter, js_class = "Animation", js_name = "ready")]
124 #[doc = "Getter for the `ready` field of this object."]
125 #[doc = ""]
126 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/ready)"]
127 #[doc = ""]
128 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
129 pub fn ready(this: &Animation) -> Result<::js_sys::Promise, JsValue>;
130 #[wasm_bindgen(catch, method, getter, js_class = "Animation", js_name = "finished")]
131 #[doc = "Getter for the `finished` field of this object."]
132 #[doc = ""]
133 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/finished)"]
134 #[doc = ""]
135 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
136 pub fn finished(this: &Animation) -> Result<::js_sys::Promise, JsValue>;
137 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "onfinish")]
138 #[doc = "Getter for the `onfinish` field of this object."]
139 #[doc = ""]
140 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/onfinish)"]
141 #[doc = ""]
142 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
143 pub fn onfinish(this: &Animation) -> Option<::js_sys::Function>;
144 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "onfinish")]
145 #[doc = "Setter for the `onfinish` field of this object."]
146 #[doc = ""]
147 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/onfinish)"]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
150 pub fn set_onfinish(this: &Animation, value: Option<&::js_sys::Function>);
151 #[wasm_bindgen(method, getter, js_class = "Animation", js_name = "oncancel")]
152 #[doc = "Getter for the `oncancel` field of this object."]
153 #[doc = ""]
154 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/oncancel)"]
155 #[doc = ""]
156 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
157 pub fn oncancel(this: &Animation) -> Option<::js_sys::Function>;
158 #[wasm_bindgen(method, setter, js_class = "Animation", js_name = "oncancel")]
159 #[doc = "Setter for the `oncancel` field of this object."]
160 #[doc = ""]
161 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/oncancel)"]
162 #[doc = ""]
163 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
164 pub fn set_oncancel(this: &Animation, value: Option<&::js_sys::Function>);
165 #[wasm_bindgen(catch, constructor, js_class = "Animation")]
166 #[doc = "The `new Animation(..)` constructor, creating a new instance of `Animation`."]
167 #[doc = ""]
168 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation)"]
169 #[doc = ""]
170 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
171 pub fn new() -> Result<Animation, JsValue>;
172 #[cfg(feature = "AnimationEffect")]
173 #[wasm_bindgen(catch, constructor, js_class = "Animation")]
174 #[doc = "The `new Animation(..)` constructor, creating a new instance of `Animation`."]
175 #[doc = ""]
176 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation)"]
177 #[doc = ""]
178 #[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`*"]
179 pub fn new_with_effect(effect: Option<&AnimationEffect>) -> Result<Animation, JsValue>;
180 #[cfg(all(feature = "AnimationEffect", feature = "AnimationTimeline",))]
181 #[wasm_bindgen(catch, constructor, js_class = "Animation")]
182 #[doc = "The `new Animation(..)` constructor, creating a new instance of `Animation`."]
183 #[doc = ""]
184 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation)"]
185 #[doc = ""]
186 #[doc = "*This API requires the following crate features to be activated: `Animation`, `AnimationEffect`, `AnimationTimeline`*"]
187 pub fn new_with_effect_and_timeline(
188 effect: Option<&AnimationEffect>,
189 timeline: Option<&AnimationTimeline>,
190 ) -> Result<Animation, JsValue>;
191 #[wasm_bindgen(method, js_class = "Animation")]
192 #[doc = "The `cancel()` method."]
193 #[doc = ""]
194 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/cancel)"]
195 #[doc = ""]
196 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
197 pub fn cancel(this: &Animation);
198 #[wasm_bindgen(catch, method, js_class = "Animation")]
199 #[doc = "The `finish()` method."]
200 #[doc = ""]
201 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/finish)"]
202 #[doc = ""]
203 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
204 pub fn finish(this: &Animation) -> Result<(), JsValue>;
205 #[wasm_bindgen(catch, method, js_class = "Animation")]
206 #[doc = "The `pause()` method."]
207 #[doc = ""]
208 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/pause)"]
209 #[doc = ""]
210 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
211 pub fn pause(this: &Animation) -> Result<(), JsValue>;
212 #[wasm_bindgen(catch, method, js_class = "Animation")]
213 #[doc = "The `play()` method."]
214 #[doc = ""]
215 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/play)"]
216 #[doc = ""]
217 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
218 pub fn play(this: &Animation) -> Result<(), JsValue>;
219 #[wasm_bindgen(catch, method, js_class = "Animation")]
220 #[doc = "The `reverse()` method."]
221 #[doc = ""]
222 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/reverse)"]
223 #[doc = ""]
224 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
225 pub fn reverse(this: &Animation) -> Result<(), JsValue>;
226 #[wasm_bindgen(method, js_class = "Animation", js_name = "updatePlaybackRate")]
227 #[doc = "The `updatePlaybackRate()` method."]
228 #[doc = ""]
229 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Animation/updatePlaybackRate)"]
230 #[doc = ""]
231 #[doc = "*This API requires the following crate features to be activated: `Animation`*"]
232 pub fn update_playback_rate(this: &Animation, playback_rate: f64);
233}