web_sys/features/
gen_AnimationPropertyValueDetails.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "AnimationPropertyValueDetails"
10 )]
11 #[derive(Debug, Clone, PartialEq, Eq)]
12 #[doc = "The `AnimationPropertyValueDetails` dictionary."]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
15 pub type AnimationPropertyValueDetails;
16 #[cfg(feature = "CompositeOperation")]
17 #[doc = "Get the `composite` field of this object."]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
20 #[wasm_bindgen(method, getter = "composite")]
21 pub fn get_composite(this: &AnimationPropertyValueDetails) -> CompositeOperation;
22 #[cfg(feature = "CompositeOperation")]
23 #[doc = "Change the `composite` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
26 #[wasm_bindgen(method, setter = "composite")]
27 pub fn set_composite(this: &AnimationPropertyValueDetails, val: CompositeOperation);
28 #[doc = "Get the `easing` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
31 #[wasm_bindgen(method, getter = "easing")]
32 pub fn get_easing(this: &AnimationPropertyValueDetails) -> Option<::alloc::string::String>;
33 #[doc = "Change the `easing` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
36 #[wasm_bindgen(method, setter = "easing")]
37 pub fn set_easing(this: &AnimationPropertyValueDetails, val: &str);
38 #[doc = "Get the `offset` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
41 #[wasm_bindgen(method, getter = "offset")]
42 pub fn get_offset(this: &AnimationPropertyValueDetails) -> f64;
43 #[doc = "Change the `offset` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
46 #[wasm_bindgen(method, setter = "offset")]
47 pub fn set_offset(this: &AnimationPropertyValueDetails, val: f64);
48 #[doc = "Get the `value` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
51 #[wasm_bindgen(method, getter = "value")]
52 pub fn get_value(this: &AnimationPropertyValueDetails) -> Option<::alloc::string::String>;
53 #[doc = "Change the `value` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"]
56 #[wasm_bindgen(method, setter = "value")]
57 pub fn set_value(this: &AnimationPropertyValueDetails, val: &str);
58}
59impl AnimationPropertyValueDetails {
60 #[cfg(feature = "CompositeOperation")]
61 #[doc = "Construct a new `AnimationPropertyValueDetails`."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"]
64 pub fn new(composite: CompositeOperation, offset: f64) -> Self {
65 #[allow(unused_mut)]
66 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
67 ret.set_composite(composite);
68 ret.set_offset(offset);
69 ret
70 }
71 #[cfg(feature = "CompositeOperation")]
72 #[deprecated = "Use `set_composite()` instead."]
73 pub fn composite(&mut self, val: CompositeOperation) -> &mut Self {
74 self.set_composite(val);
75 self
76 }
77 #[deprecated = "Use `set_easing()` instead."]
78 pub fn easing(&mut self, val: &str) -> &mut Self {
79 self.set_easing(val);
80 self
81 }
82 #[deprecated = "Use `set_offset()` instead."]
83 pub fn offset(&mut self, val: f64) -> &mut Self {
84 self.set_offset(val);
85 self
86 }
87 #[deprecated = "Use `set_value()` instead."]
88 pub fn value(&mut self, val: &str) -> &mut Self {
89 self.set_value(val);
90 self
91 }
92}