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