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