Skip to main content

web_sys/features/
gen_StyleSheetApplicableStateChangeEventInit.rs

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