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 = AnimationPropertyValueDetails)] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `AnimationPropertyValueDetails` dictionary."] 9 #[doc = ""] 10 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] 11 pub type AnimationPropertyValueDetails; 12 } 13 impl AnimationPropertyValueDetails { 14 #[cfg(feature = "CompositeOperation")] 15 #[doc = "Construct a new `AnimationPropertyValueDetails`."] 16 #[doc = ""] 17 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] new(composite: CompositeOperation, offset: f64) -> Self18 pub fn new(composite: CompositeOperation, offset: f64) -> Self { 19 #[allow(unused_mut)] 20 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); 21 ret.composite(composite); 22 ret.offset(offset); 23 ret 24 } 25 #[cfg(feature = "CompositeOperation")] 26 #[doc = "Change the `composite` field of this object."] 27 #[doc = ""] 28 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] composite(&mut self, val: CompositeOperation) -> &mut Self29 pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { 30 use wasm_bindgen::JsValue; 31 let r = ::js_sys::Reflect::set( 32 self.as_ref(), 33 &JsValue::from("composite"), 34 &JsValue::from(val), 35 ); 36 debug_assert!( 37 r.is_ok(), 38 "setting properties should never fail on our dictionary objects" 39 ); 40 let _ = r; 41 self 42 } 43 #[doc = "Change the `easing` field of this object."] 44 #[doc = ""] 45 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] easing(&mut self, val: &str) -> &mut Self46 pub fn easing(&mut self, val: &str) -> &mut Self { 47 use wasm_bindgen::JsValue; 48 let r = 49 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val)); 50 debug_assert!( 51 r.is_ok(), 52 "setting properties should never fail on our dictionary objects" 53 ); 54 let _ = r; 55 self 56 } 57 #[doc = "Change the `offset` field of this object."] 58 #[doc = ""] 59 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] offset(&mut self, val: f64) -> &mut Self60 pub fn offset(&mut self, val: f64) -> &mut Self { 61 use wasm_bindgen::JsValue; 62 let r = 63 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val)); 64 debug_assert!( 65 r.is_ok(), 66 "setting properties should never fail on our dictionary objects" 67 ); 68 let _ = r; 69 self 70 } 71 #[doc = "Change the `value` field of this object."] 72 #[doc = ""] 73 #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] value(&mut self, val: &str) -> &mut Self74 pub fn value(&mut self, val: &str) -> &mut Self { 75 use wasm_bindgen::JsValue; 76 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("value"), &JsValue::from(val)); 77 debug_assert!( 78 r.is_ok(), 79 "setting properties should never fail on our dictionary objects" 80 ); 81 let _ = r; 82 self 83 } 84 } 85