web_sys/features/
gen_CompositionEventInit.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 = CompositionEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `CompositionEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
12 pub type CompositionEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &CompositionEventInit) -> 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: `CompositionEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &CompositionEventInit, 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: `CompositionEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &CompositionEventInit) -> 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: `CompositionEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &CompositionEventInit, 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: `CompositionEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &CompositionEventInit) -> 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: `CompositionEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &CompositionEventInit, val: bool);
43 #[doc = "Get the `detail` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
46 #[wasm_bindgen(method, getter = "detail")]
47 pub fn get_detail(this: &CompositionEventInit) -> Option<i32>;
48 #[doc = "Change the `detail` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
51 #[wasm_bindgen(method, setter = "detail")]
52 pub fn set_detail(this: &CompositionEventInit, val: i32);
53 #[cfg(feature = "Window")]
54 #[doc = "Get the `view` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"]
57 #[wasm_bindgen(method, getter = "view")]
58 pub fn get_view(this: &CompositionEventInit) -> Option<Window>;
59 #[cfg(feature = "Window")]
60 #[doc = "Change the `view` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"]
63 #[wasm_bindgen(method, setter = "view")]
64 pub fn set_view(this: &CompositionEventInit, val: Option<&Window>);
65 #[doc = "Get the `data` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
68 #[wasm_bindgen(method, getter = "data")]
69 pub fn get_data(this: &CompositionEventInit) -> Option<::alloc::string::String>;
70 #[doc = "Change the `data` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
73 #[wasm_bindgen(method, setter = "data")]
74 pub fn set_data(this: &CompositionEventInit, val: &str);
75}
76impl CompositionEventInit {
77 #[doc = "Construct a new `CompositionEventInit`."]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"]
80 pub fn new() -> Self {
81 #[allow(unused_mut)]
82 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
83 ret
84 }
85 #[deprecated = "Use `set_bubbles()` instead."]
86 pub fn bubbles(&mut self, val: bool) -> &mut Self {
87 self.set_bubbles(val);
88 self
89 }
90 #[deprecated = "Use `set_cancelable()` instead."]
91 pub fn cancelable(&mut self, val: bool) -> &mut Self {
92 self.set_cancelable(val);
93 self
94 }
95 #[deprecated = "Use `set_composed()` instead."]
96 pub fn composed(&mut self, val: bool) -> &mut Self {
97 self.set_composed(val);
98 self
99 }
100 #[deprecated = "Use `set_detail()` instead."]
101 pub fn detail(&mut self, val: i32) -> &mut Self {
102 self.set_detail(val);
103 self
104 }
105 #[cfg(feature = "Window")]
106 #[deprecated = "Use `set_view()` instead."]
107 pub fn view(&mut self, val: Option<&Window>) -> &mut Self {
108 self.set_view(val);
109 self
110 }
111 #[deprecated = "Use `set_data()` instead."]
112 pub fn data(&mut self, val: &str) -> &mut Self {
113 self.set_data(val);
114 self
115 }
116}
117impl Default for CompositionEventInit {
118 fn default() -> Self {
119 Self::new()
120 }
121}