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