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