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