web_sys/features/
gen_Node.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = Node , typescript_type = "Node")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `Node` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub type Node;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = nodeType)]
    #[doc = "Getter for the `nodeType` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn node_type(this: &Node) -> u16;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = nodeName)]
    #[doc = "Getter for the `nodeName` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn node_name(this: &Node) -> ::alloc::string::String;
    # [wasm_bindgen (structural , catch , method , getter , js_class = "Node" , js_name = baseURI)]
    #[doc = "Getter for the `baseURI` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/baseURI)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn base_uri(this: &Node) -> Result<Option<::alloc::string::String>, JsValue>;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = isConnected)]
    #[doc = "Getter for the `isConnected` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn is_connected(this: &Node) -> bool;
    #[cfg(feature = "Document")]
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = ownerDocument)]
    #[doc = "Getter for the `ownerDocument` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Document`, `Node`*"]
    pub fn owner_document(this: &Node) -> Option<Document>;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = parentNode)]
    #[doc = "Getter for the `parentNode` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn parent_node(this: &Node) -> Option<Node>;
    #[cfg(feature = "Element")]
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = parentElement)]
    #[doc = "Getter for the `parentElement` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Element`, `Node`*"]
    pub fn parent_element(this: &Node) -> Option<Element>;
    #[cfg(feature = "NodeList")]
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = childNodes)]
    #[doc = "Getter for the `childNodes` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`, `NodeList`*"]
    pub fn child_nodes(this: &Node) -> NodeList;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = firstChild)]
    #[doc = "Getter for the `firstChild` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/firstChild)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn first_child(this: &Node) -> Option<Node>;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = lastChild)]
    #[doc = "Getter for the `lastChild` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/lastChild)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn last_child(this: &Node) -> Option<Node>;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = previousSibling)]
    #[doc = "Getter for the `previousSibling` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/previousSibling)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn previous_sibling(this: &Node) -> Option<Node>;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = nextSibling)]
    #[doc = "Getter for the `nextSibling` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSibling)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn next_sibling(this: &Node) -> Option<Node>;
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = nodeValue)]
    #[doc = "Getter for the `nodeValue` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn node_value(this: &Node) -> Option<::alloc::string::String>;
    # [wasm_bindgen (structural , method , setter , js_class = "Node" , js_name = nodeValue)]
    #[doc = "Setter for the `nodeValue` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn set_node_value(this: &Node, value: Option<&str>);
    # [wasm_bindgen (structural , method , getter , js_class = "Node" , js_name = textContent)]
    #[doc = "Getter for the `textContent` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn text_content(this: &Node) -> Option<::alloc::string::String>;
    # [wasm_bindgen (structural , method , setter , js_class = "Node" , js_name = textContent)]
    #[doc = "Setter for the `textContent` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn set_text_content(this: &Node, value: Option<&str>);
    # [wasm_bindgen (catch , method , structural , js_class = "Node" , js_name = appendChild)]
    #[doc = "The `appendChild()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn append_child(this: &Node, node: &Node) -> Result<Node, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "Node" , js_name = cloneNode)]
    #[doc = "The `cloneNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn clone_node(this: &Node) -> Result<Node, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "Node" , js_name = cloneNode)]
    #[doc = "The `cloneNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn clone_node_with_deep(this: &Node, deep: bool) -> Result<Node, JsValue>;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = compareDocumentPosition)]
    #[doc = "The `compareDocumentPosition()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn compare_document_position(this: &Node, other: &Node) -> u16;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = contains)]
    #[doc = "The `contains()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn contains(this: &Node, other: Option<&Node>) -> bool;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = getRootNode)]
    #[doc = "The `getRootNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn get_root_node(this: &Node) -> Node;
    #[cfg(feature = "GetRootNodeOptions")]
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = getRootNode)]
    #[doc = "The `getRootNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`, `Node`*"]
    pub fn get_root_node_with_options(this: &Node, options: &GetRootNodeOptions) -> Node;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = hasChildNodes)]
    #[doc = "The `hasChildNodes()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/hasChildNodes)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn has_child_nodes(this: &Node) -> bool;
    # [wasm_bindgen (catch , method , structural , js_class = "Node" , js_name = insertBefore)]
    #[doc = "The `insertBefore()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn insert_before(this: &Node, node: &Node, child: Option<&Node>) -> Result<Node, JsValue>;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = isDefaultNamespace)]
    #[doc = "The `isDefaultNamespace()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/isDefaultNamespace)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn is_default_namespace(this: &Node, namespace: Option<&str>) -> bool;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = isEqualNode)]
    #[doc = "The `isEqualNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/isEqualNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn is_equal_node(this: &Node, node: Option<&Node>) -> bool;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = isSameNode)]
    #[doc = "The `isSameNode()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/isSameNode)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn is_same_node(this: &Node, node: Option<&Node>) -> bool;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = lookupNamespaceURI)]
    #[doc = "The `lookupNamespaceURI()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/lookupNamespaceURI)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn lookup_namespace_uri(
        this: &Node,
        prefix: Option<&str>,
    ) -> Option<::alloc::string::String>;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = lookupPrefix)]
    #[doc = "The `lookupPrefix()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/lookupPrefix)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn lookup_prefix(this: &Node, namespace: Option<&str>) -> Option<::alloc::string::String>;
    # [wasm_bindgen (method , structural , js_class = "Node" , js_name = normalize)]
    #[doc = "The `normalize()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/normalize)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn normalize(this: &Node);
    # [wasm_bindgen (catch , method , structural , js_class = "Node" , js_name = removeChild)]
    #[doc = "The `removeChild()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/removeChild)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn remove_child(this: &Node, child: &Node) -> Result<Node, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "Node" , js_name = replaceChild)]
    #[doc = "The `replaceChild()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Node/replaceChild)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub fn replace_child(this: &Node, node: &Node, child: &Node) -> Result<Node, JsValue>;
}
impl Node {
    #[doc = "The `Node.ELEMENT_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const ELEMENT_NODE: u16 = 1u64 as u16;
    #[doc = "The `Node.ATTRIBUTE_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const ATTRIBUTE_NODE: u16 = 2u64 as u16;
    #[doc = "The `Node.TEXT_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const TEXT_NODE: u16 = 3u64 as u16;
    #[doc = "The `Node.CDATA_SECTION_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const CDATA_SECTION_NODE: u16 = 4u64 as u16;
    #[doc = "The `Node.ENTITY_REFERENCE_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const ENTITY_REFERENCE_NODE: u16 = 5u64 as u16;
    #[doc = "The `Node.ENTITY_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const ENTITY_NODE: u16 = 6u64 as u16;
    #[doc = "The `Node.PROCESSING_INSTRUCTION_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const PROCESSING_INSTRUCTION_NODE: u16 = 7u64 as u16;
    #[doc = "The `Node.COMMENT_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const COMMENT_NODE: u16 = 8u64 as u16;
    #[doc = "The `Node.DOCUMENT_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_NODE: u16 = 9u64 as u16;
    #[doc = "The `Node.DOCUMENT_TYPE_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_TYPE_NODE: u16 = 10u64 as u16;
    #[doc = "The `Node.DOCUMENT_FRAGMENT_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_FRAGMENT_NODE: u16 = 11u64 as u16;
    #[doc = "The `Node.NOTATION_NODE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const NOTATION_NODE: u16 = 12u64 as u16;
    #[doc = "The `Node.DOCUMENT_POSITION_DISCONNECTED` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_POSITION_DISCONNECTED: u16 = 1u64 as u16;
    #[doc = "The `Node.DOCUMENT_POSITION_PRECEDING` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_POSITION_PRECEDING: u16 = 2u64 as u16;
    #[doc = "The `Node.DOCUMENT_POSITION_FOLLOWING` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_POSITION_FOLLOWING: u16 = 4u64 as u16;
    #[doc = "The `Node.DOCUMENT_POSITION_CONTAINS` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_POSITION_CONTAINS: u16 = 8u64 as u16;
    #[doc = "The `Node.DOCUMENT_POSITION_CONTAINED_BY` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_POSITION_CONTAINED_BY: u16 = 16u64 as u16;
    #[doc = "The `Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Node`*"]
    pub const DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: u16 = 32u64 as u16;
}