1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = AnimationPropertyDetails)]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `AnimationPropertyDetails` dictionary."]
9     #[doc = ""]
10     #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
11     pub type AnimationPropertyDetails;
12 }
13 impl AnimationPropertyDetails {
14     #[doc = "Construct a new `AnimationPropertyDetails`."]
15     #[doc = ""]
16     #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
new( property: &str, running_on_compositor: bool, values: &::wasm_bindgen::JsValue, ) -> Self17     pub fn new(
18         property: &str,
19         running_on_compositor: bool,
20         values: &::wasm_bindgen::JsValue,
21     ) -> Self {
22         #[allow(unused_mut)]
23         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
24         ret.property(property);
25         ret.running_on_compositor(running_on_compositor);
26         ret.values(values);
27         ret
28     }
29     #[doc = "Change the `property` field of this object."]
30     #[doc = ""]
31     #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
property(&mut self, val: &str) -> &mut Self32     pub fn property(&mut self, val: &str) -> &mut Self {
33         use wasm_bindgen::JsValue;
34         let r = ::js_sys::Reflect::set(
35             self.as_ref(),
36             &JsValue::from("property"),
37             &JsValue::from(val),
38         );
39         debug_assert!(
40             r.is_ok(),
41             "setting properties should never fail on our dictionary objects"
42         );
43         let _ = r;
44         self
45     }
46     #[doc = "Change the `runningOnCompositor` field of this object."]
47     #[doc = ""]
48     #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
running_on_compositor(&mut self, val: bool) -> &mut Self49     pub fn running_on_compositor(&mut self, val: bool) -> &mut Self {
50         use wasm_bindgen::JsValue;
51         let r = ::js_sys::Reflect::set(
52             self.as_ref(),
53             &JsValue::from("runningOnCompositor"),
54             &JsValue::from(val),
55         );
56         debug_assert!(
57             r.is_ok(),
58             "setting properties should never fail on our dictionary objects"
59         );
60         let _ = r;
61         self
62     }
63     #[doc = "Change the `values` field of this object."]
64     #[doc = ""]
65     #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
values(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self66     pub fn values(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
67         use wasm_bindgen::JsValue;
68         let r =
69             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("values"), &JsValue::from(val));
70         debug_assert!(
71             r.is_ok(),
72             "setting properties should never fail on our dictionary objects"
73         );
74         let _ = r;
75         self
76     }
77     #[doc = "Change the `warning` field of this object."]
78     #[doc = ""]
79     #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"]
warning(&mut self, val: &str) -> &mut Self80     pub fn warning(&mut self, val: &str) -> &mut Self {
81         use wasm_bindgen::JsValue;
82         let r = ::js_sys::Reflect::set(
83             self.as_ref(),
84             &JsValue::from("warning"),
85             &JsValue::from(val),
86         );
87         debug_assert!(
88             r.is_ok(),
89             "setting properties should never fail on our dictionary objects"
90         );
91         let _ = r;
92         self
93     }
94 }
95