web_sys/features/
gen_TreeWalker.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "TreeWalker",
10 typescript_type = "TreeWalker"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `TreeWalker` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `TreeWalker`*"]
18 pub type TreeWalker;
19 #[cfg(feature = "Node")]
20 #[wasm_bindgen(method, getter, js_class = "TreeWalker", js_name = "root")]
21 #[doc = "Getter for the `root` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/root)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
26 pub fn root(this: &TreeWalker) -> Node;
27 #[wasm_bindgen(method, getter, js_class = "TreeWalker", js_name = "whatToShow")]
28 #[doc = "Getter for the `whatToShow` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/whatToShow)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `TreeWalker`*"]
33 pub fn what_to_show(this: &TreeWalker) -> u32;
34 #[cfg(feature = "NodeFilter")]
35 #[wasm_bindgen(method, getter, js_class = "TreeWalker", js_name = "filter")]
36 #[doc = "Getter for the `filter` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/filter)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `NodeFilter`, `TreeWalker`*"]
41 pub fn filter(this: &TreeWalker) -> Option<NodeFilter>;
42 #[cfg(feature = "Node")]
43 #[wasm_bindgen(method, getter, js_class = "TreeWalker", js_name = "currentNode")]
44 #[doc = "Getter for the `currentNode` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/currentNode)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
49 pub fn current_node(this: &TreeWalker) -> Node;
50 #[cfg(feature = "Node")]
51 #[wasm_bindgen(method, setter, js_class = "TreeWalker", js_name = "currentNode")]
52 #[doc = "Setter for the `currentNode` field of this object."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/currentNode)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
57 pub fn set_current_node(this: &TreeWalker, value: &Node);
58 #[cfg(feature = "Node")]
59 #[wasm_bindgen(catch, method, js_class = "TreeWalker", js_name = "firstChild")]
60 #[doc = "The `firstChild()` method."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/firstChild)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
65 pub fn first_child(this: &TreeWalker) -> Result<Option<Node>, JsValue>;
66 #[cfg(feature = "Node")]
67 #[wasm_bindgen(catch, method, js_class = "TreeWalker", js_name = "lastChild")]
68 #[doc = "The `lastChild()` method."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/lastChild)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
73 pub fn last_child(this: &TreeWalker) -> Result<Option<Node>, JsValue>;
74 #[cfg(feature = "Node")]
75 #[wasm_bindgen(catch, method, js_class = "TreeWalker", js_name = "nextNode")]
76 #[doc = "The `nextNode()` method."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/nextNode)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
81 pub fn next_node(this: &TreeWalker) -> Result<Option<Node>, JsValue>;
82 #[cfg(feature = "Node")]
83 #[wasm_bindgen(catch, method, js_class = "TreeWalker", js_name = "nextSibling")]
84 #[doc = "The `nextSibling()` method."]
85 #[doc = ""]
86 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/nextSibling)"]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
89 pub fn next_sibling(this: &TreeWalker) -> Result<Option<Node>, JsValue>;
90 #[cfg(feature = "Node")]
91 #[wasm_bindgen(catch, method, js_class = "TreeWalker", js_name = "parentNode")]
92 #[doc = "The `parentNode()` method."]
93 #[doc = ""]
94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/parentNode)"]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
97 pub fn parent_node(this: &TreeWalker) -> Result<Option<Node>, JsValue>;
98 #[cfg(feature = "Node")]
99 #[wasm_bindgen(catch, method, js_class = "TreeWalker", js_name = "previousNode")]
100 #[doc = "The `previousNode()` method."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/previousNode)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
105 pub fn previous_node(this: &TreeWalker) -> Result<Option<Node>, JsValue>;
106 #[cfg(feature = "Node")]
107 #[wasm_bindgen(catch, method, js_class = "TreeWalker", js_name = "previousSibling")]
108 #[doc = "The `previousSibling()` method."]
109 #[doc = ""]
110 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/previousSibling)"]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `Node`, `TreeWalker`*"]
113 pub fn previous_sibling(this: &TreeWalker) -> Result<Option<Node>, JsValue>;
114}