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