web_sys/features/
gen_MutationEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = MutationEvent , typescript_type = "MutationEvent")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `MutationEvent` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
14    pub type MutationEvent;
15    #[cfg(feature = "Node")]
16    # [wasm_bindgen (structural , method , getter , js_class = "MutationEvent" , js_name = relatedNode)]
17    #[doc = "Getter for the `relatedNode` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/relatedNode)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`, `Node`*"]
22    pub fn related_node(this: &MutationEvent) -> Option<Node>;
23    # [wasm_bindgen (structural , method , getter , js_class = "MutationEvent" , js_name = prevValue)]
24    #[doc = "Getter for the `prevValue` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/prevValue)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
29    pub fn prev_value(this: &MutationEvent) -> ::alloc::string::String;
30    # [wasm_bindgen (structural , method , getter , js_class = "MutationEvent" , js_name = newValue)]
31    #[doc = "Getter for the `newValue` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/newValue)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
36    pub fn new_value(this: &MutationEvent) -> ::alloc::string::String;
37    # [wasm_bindgen (structural , method , getter , js_class = "MutationEvent" , js_name = attrName)]
38    #[doc = "Getter for the `attrName` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/attrName)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
43    pub fn attr_name(this: &MutationEvent) -> ::alloc::string::String;
44    # [wasm_bindgen (structural , method , getter , js_class = "MutationEvent" , js_name = attrChange)]
45    #[doc = "Getter for the `attrChange` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/attrChange)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
50    pub fn attr_change(this: &MutationEvent) -> u16;
51    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
52    #[doc = "The `initMutationEvent()` method."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
57    pub fn init_mutation_event(this: &MutationEvent, type_: &str) -> Result<(), JsValue>;
58    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
59    #[doc = "The `initMutationEvent()` method."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
64    pub fn init_mutation_event_with_can_bubble(
65        this: &MutationEvent,
66        type_: &str,
67        can_bubble: bool,
68    ) -> Result<(), JsValue>;
69    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
70    #[doc = "The `initMutationEvent()` method."]
71    #[doc = ""]
72    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
75    pub fn init_mutation_event_with_can_bubble_and_cancelable(
76        this: &MutationEvent,
77        type_: &str,
78        can_bubble: bool,
79        cancelable: bool,
80    ) -> Result<(), JsValue>;
81    #[cfg(feature = "Node")]
82    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
83    #[doc = "The `initMutationEvent()` method."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`, `Node`*"]
88    pub fn init_mutation_event_with_can_bubble_and_cancelable_and_related_node(
89        this: &MutationEvent,
90        type_: &str,
91        can_bubble: bool,
92        cancelable: bool,
93        related_node: Option<&Node>,
94    ) -> Result<(), JsValue>;
95    #[cfg(feature = "Node")]
96    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
97    #[doc = "The `initMutationEvent()` method."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`, `Node`*"]
102    pub fn init_mutation_event_with_can_bubble_and_cancelable_and_related_node_and_prev_value(
103        this: &MutationEvent,
104        type_: &str,
105        can_bubble: bool,
106        cancelable: bool,
107        related_node: Option<&Node>,
108        prev_value: &str,
109    ) -> Result<(), JsValue>;
110    #[cfg(feature = "Node")]
111    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
112    #[doc = "The `initMutationEvent()` method."]
113    #[doc = ""]
114    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
115    #[doc = ""]
116    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`, `Node`*"]
117    pub fn init_mutation_event_with_can_bubble_and_cancelable_and_related_node_and_prev_value_and_new_value(
118        this: &MutationEvent,
119        type_: &str,
120        can_bubble: bool,
121        cancelable: bool,
122        related_node: Option<&Node>,
123        prev_value: &str,
124        new_value: &str,
125    ) -> Result<(), JsValue>;
126    #[cfg(feature = "Node")]
127    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
128    #[doc = "The `initMutationEvent()` method."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`, `Node`*"]
133    pub fn init_mutation_event_with_can_bubble_and_cancelable_and_related_node_and_prev_value_and_new_value_and_attr_name(
134        this: &MutationEvent,
135        type_: &str,
136        can_bubble: bool,
137        cancelable: bool,
138        related_node: Option<&Node>,
139        prev_value: &str,
140        new_value: &str,
141        attr_name: &str,
142    ) -> Result<(), JsValue>;
143    #[cfg(feature = "Node")]
144    # [wasm_bindgen (catch , method , structural , js_class = "MutationEvent" , js_name = initMutationEvent)]
145    #[doc = "The `initMutationEvent()` method."]
146    #[doc = ""]
147    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent/initMutationEvent)"]
148    #[doc = ""]
149    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`, `Node`*"]
150    pub fn init_mutation_event_with_can_bubble_and_cancelable_and_related_node_and_prev_value_and_new_value_and_attr_name_and_attr_change(
151        this: &MutationEvent,
152        type_: &str,
153        can_bubble: bool,
154        cancelable: bool,
155        related_node: Option<&Node>,
156        prev_value: &str,
157        new_value: &str,
158        attr_name: &str,
159        attr_change: u16,
160    ) -> Result<(), JsValue>;
161}
162impl MutationEvent {
163    #[doc = "The `MutationEvent.MODIFICATION` const."]
164    #[doc = ""]
165    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
166    pub const MODIFICATION: u16 = 1u64 as u16;
167    #[doc = "The `MutationEvent.ADDITION` const."]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
170    pub const ADDITION: u16 = 2u64 as u16;
171    #[doc = "The `MutationEvent.REMOVAL` const."]
172    #[doc = ""]
173    #[doc = "*This API requires the following crate features to be activated: `MutationEvent`*"]
174    pub const REMOVAL: u16 = 3u64 as u16;
175}