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