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