web_sys/features/
gen_MutationObserverInit.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 = MutationObserverInit)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `MutationObserverInit` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
12    pub type MutationObserverInit;
13    #[doc = "Get the `animations` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
16    #[wasm_bindgen(method, getter = "animations")]
17    pub fn get_animations(this: &MutationObserverInit) -> Option<bool>;
18    #[doc = "Change the `animations` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
21    #[wasm_bindgen(method, setter = "animations")]
22    pub fn set_animations(this: &MutationObserverInit, val: bool);
23    #[doc = "Get the `attributeFilter` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
26    #[wasm_bindgen(method, getter = "attributeFilter")]
27    pub fn get_attribute_filter(this: &MutationObserverInit) -> Option<::js_sys::Array>;
28    #[doc = "Change the `attributeFilter` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
31    #[wasm_bindgen(method, setter = "attributeFilter")]
32    pub fn set_attribute_filter(this: &MutationObserverInit, val: &::wasm_bindgen::JsValue);
33    #[doc = "Get the `attributeOldValue` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
36    #[wasm_bindgen(method, getter = "attributeOldValue")]
37    pub fn get_attribute_old_value(this: &MutationObserverInit) -> Option<bool>;
38    #[doc = "Change the `attributeOldValue` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
41    #[wasm_bindgen(method, setter = "attributeOldValue")]
42    pub fn set_attribute_old_value(this: &MutationObserverInit, val: bool);
43    #[doc = "Get the `attributes` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
46    #[wasm_bindgen(method, getter = "attributes")]
47    pub fn get_attributes(this: &MutationObserverInit) -> Option<bool>;
48    #[doc = "Change the `attributes` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
51    #[wasm_bindgen(method, setter = "attributes")]
52    pub fn set_attributes(this: &MutationObserverInit, val: bool);
53    #[doc = "Get the `characterData` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
56    #[wasm_bindgen(method, getter = "characterData")]
57    pub fn get_character_data(this: &MutationObserverInit) -> Option<bool>;
58    #[doc = "Change the `characterData` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
61    #[wasm_bindgen(method, setter = "characterData")]
62    pub fn set_character_data(this: &MutationObserverInit, val: bool);
63    #[doc = "Get the `characterDataOldValue` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
66    #[wasm_bindgen(method, getter = "characterDataOldValue")]
67    pub fn get_character_data_old_value(this: &MutationObserverInit) -> Option<bool>;
68    #[doc = "Change the `characterDataOldValue` field of this object."]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
71    #[wasm_bindgen(method, setter = "characterDataOldValue")]
72    pub fn set_character_data_old_value(this: &MutationObserverInit, val: bool);
73    #[doc = "Get the `childList` field of this object."]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
76    #[wasm_bindgen(method, getter = "childList")]
77    pub fn get_child_list(this: &MutationObserverInit) -> Option<bool>;
78    #[doc = "Change the `childList` field of this object."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
81    #[wasm_bindgen(method, setter = "childList")]
82    pub fn set_child_list(this: &MutationObserverInit, val: bool);
83    #[doc = "Get the `nativeAnonymousChildList` field of this object."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
86    #[wasm_bindgen(method, getter = "nativeAnonymousChildList")]
87    pub fn get_native_anonymous_child_list(this: &MutationObserverInit) -> Option<bool>;
88    #[doc = "Change the `nativeAnonymousChildList` field of this object."]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
91    #[wasm_bindgen(method, setter = "nativeAnonymousChildList")]
92    pub fn set_native_anonymous_child_list(this: &MutationObserverInit, val: bool);
93    #[doc = "Get the `subtree` field of this object."]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
96    #[wasm_bindgen(method, getter = "subtree")]
97    pub fn get_subtree(this: &MutationObserverInit) -> Option<bool>;
98    #[doc = "Change the `subtree` field of this object."]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
101    #[wasm_bindgen(method, setter = "subtree")]
102    pub fn set_subtree(this: &MutationObserverInit, val: bool);
103}
104impl MutationObserverInit {
105    #[doc = "Construct a new `MutationObserverInit`."]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"]
108    pub fn new() -> Self {
109        #[allow(unused_mut)]
110        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
111        ret
112    }
113    #[deprecated = "Use `set_animations()` instead."]
114    pub fn animations(&mut self, val: bool) -> &mut Self {
115        self.set_animations(val);
116        self
117    }
118    #[deprecated = "Use `set_attribute_filter()` instead."]
119    pub fn attribute_filter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
120        self.set_attribute_filter(val);
121        self
122    }
123    #[deprecated = "Use `set_attribute_old_value()` instead."]
124    pub fn attribute_old_value(&mut self, val: bool) -> &mut Self {
125        self.set_attribute_old_value(val);
126        self
127    }
128    #[deprecated = "Use `set_attributes()` instead."]
129    pub fn attributes(&mut self, val: bool) -> &mut Self {
130        self.set_attributes(val);
131        self
132    }
133    #[deprecated = "Use `set_character_data()` instead."]
134    pub fn character_data(&mut self, val: bool) -> &mut Self {
135        self.set_character_data(val);
136        self
137    }
138    #[deprecated = "Use `set_character_data_old_value()` instead."]
139    pub fn character_data_old_value(&mut self, val: bool) -> &mut Self {
140        self.set_character_data_old_value(val);
141        self
142    }
143    #[deprecated = "Use `set_child_list()` instead."]
144    pub fn child_list(&mut self, val: bool) -> &mut Self {
145        self.set_child_list(val);
146        self
147    }
148    #[deprecated = "Use `set_native_anonymous_child_list()` instead."]
149    pub fn native_anonymous_child_list(&mut self, val: bool) -> &mut Self {
150        self.set_native_anonymous_child_list(val);
151        self
152    }
153    #[deprecated = "Use `set_subtree()` instead."]
154    pub fn subtree(&mut self, val: bool) -> &mut Self {
155        self.set_subtree(val);
156        self
157    }
158}
159impl Default for MutationObserverInit {
160    fn default() -> Self {
161        Self::new()
162    }
163}