maxcountryman_web_sys/features/
gen_BaseComputedKeyframe.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = BaseComputedKeyframe)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `BaseComputedKeyframe` dictionary."]
9 #[doc = ""]
10 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
11 pub type BaseComputedKeyframe;
12}
13impl BaseComputedKeyframe {
14 #[doc = "Construct a new `BaseComputedKeyframe`."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
17 pub fn new() -> Self {
18 #[allow(unused_mut)]
19 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20 ret
21 }
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: `BaseComputedKeyframe`, `CompositeOperation`*"]
26 pub fn composite(&mut self, val: Option<CompositeOperation>) -> &mut Self {
27 use wasm_bindgen::JsValue;
28 let r = ::js_sys::Reflect::set(
29 self.as_ref(),
30 &JsValue::from("composite"),
31 &JsValue::from(val),
32 );
33 debug_assert!(
34 r.is_ok(),
35 "setting properties should never fail on our dictionary objects"
36 );
37 let _ = r;
38 self
39 }
40 #[doc = "Change the `easing` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
43 pub fn easing(&mut self, val: &str) -> &mut Self {
44 use wasm_bindgen::JsValue;
45 let r =
46 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val));
47 debug_assert!(
48 r.is_ok(),
49 "setting properties should never fail on our dictionary objects"
50 );
51 let _ = r;
52 self
53 }
54 #[doc = "Change the `offset` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
57 pub fn offset(&mut self, val: Option<f64>) -> &mut Self {
58 use wasm_bindgen::JsValue;
59 let r =
60 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val));
61 debug_assert!(
62 r.is_ok(),
63 "setting properties should never fail on our dictionary objects"
64 );
65 let _ = r;
66 self
67 }
68 #[doc = "Change the `simulateComputeValuesFailure` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
71 pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self {
72 use wasm_bindgen::JsValue;
73 let r = ::js_sys::Reflect::set(
74 self.as_ref(),
75 &JsValue::from("simulateComputeValuesFailure"),
76 &JsValue::from(val),
77 );
78 debug_assert!(
79 r.is_ok(),
80 "setting properties should never fail on our dictionary objects"
81 );
82 let _ = r;
83 self
84 }
85 #[doc = "Change the `computedOffset` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"]
88 pub fn computed_offset(&mut self, val: f64) -> &mut Self {
89 use wasm_bindgen::JsValue;
90 let r = ::js_sys::Reflect::set(
91 self.as_ref(),
92 &JsValue::from("computedOffset"),
93 &JsValue::from(val),
94 );
95 debug_assert!(
96 r.is_ok(),
97 "setting properties should never fail on our dictionary objects"
98 );
99 let _ = r;
100 self
101 }
102}
103impl Default for BaseComputedKeyframe {
104 fn default() -> Self {
105 Self::new()
106 }
107}