web_sys/features/
gen_XPathResult.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 = "XPathResult",
10 typescript_type = "XPathResult"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `XPathResult` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
18 pub type XPathResult;
19 #[wasm_bindgen(method, getter, js_class = "XPathResult", js_name = "resultType")]
20 #[doc = "Getter for the `resultType` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/resultType)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
25 pub fn result_type(this: &XPathResult) -> u16;
26 #[wasm_bindgen(
27 catch,
28 method,
29 getter,
30 js_class = "XPathResult",
31 js_name = "numberValue"
32 )]
33 #[doc = "Getter for the `numberValue` field of this object."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/numberValue)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
38 pub fn number_value(this: &XPathResult) -> Result<f64, JsValue>;
39 #[wasm_bindgen(
40 catch,
41 method,
42 getter,
43 js_class = "XPathResult",
44 js_name = "stringValue"
45 )]
46 #[doc = "Getter for the `stringValue` field of this object."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/stringValue)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
51 pub fn string_value(this: &XPathResult) -> Result<::alloc::string::String, JsValue>;
52 #[wasm_bindgen(
53 catch,
54 method,
55 getter,
56 js_class = "XPathResult",
57 js_name = "booleanValue"
58 )]
59 #[doc = "Getter for the `booleanValue` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/booleanValue)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
64 pub fn boolean_value(this: &XPathResult) -> Result<bool, JsValue>;
65 #[cfg(feature = "Node")]
66 #[wasm_bindgen(
67 catch,
68 method,
69 getter,
70 js_class = "XPathResult",
71 js_name = "singleNodeValue"
72 )]
73 #[doc = "Getter for the `singleNodeValue` field of this object."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/singleNodeValue)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
78 pub fn single_node_value(this: &XPathResult) -> Result<Option<Node>, JsValue>;
79 #[wasm_bindgen(
80 method,
81 getter,
82 js_class = "XPathResult",
83 js_name = "invalidIteratorState"
84 )]
85 #[doc = "Getter for the `invalidIteratorState` field of this object."]
86 #[doc = ""]
87 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/invalidIteratorState)"]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
90 pub fn invalid_iterator_state(this: &XPathResult) -> bool;
91 #[wasm_bindgen(
92 catch,
93 method,
94 getter,
95 js_class = "XPathResult",
96 js_name = "snapshotLength"
97 )]
98 #[doc = "Getter for the `snapshotLength` field of this object."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotLength)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
103 pub fn snapshot_length(this: &XPathResult) -> Result<u32, JsValue>;
104 #[cfg(feature = "Node")]
105 #[wasm_bindgen(catch, method, js_class = "XPathResult", js_name = "iterateNext")]
106 #[doc = "The `iterateNext()` method."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/iterateNext)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
111 pub fn iterate_next(this: &XPathResult) -> Result<Option<Node>, JsValue>;
112 #[cfg(feature = "Node")]
113 #[wasm_bindgen(catch, method, js_class = "XPathResult", js_name = "snapshotItem")]
114 #[doc = "The `snapshotItem()` method."]
115 #[doc = ""]
116 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotItem)"]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
119 pub fn snapshot_item(this: &XPathResult, index: u32) -> Result<Option<Node>, JsValue>;
120}
121impl XPathResult {
122 #[doc = "The `XPathResult.ANY_TYPE` const."]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
125 pub const ANY_TYPE: u16 = 0i64 as u16;
126 #[doc = "The `XPathResult.NUMBER_TYPE` const."]
127 #[doc = ""]
128 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
129 pub const NUMBER_TYPE: u16 = 1u64 as u16;
130 #[doc = "The `XPathResult.STRING_TYPE` const."]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
133 pub const STRING_TYPE: u16 = 2u64 as u16;
134 #[doc = "The `XPathResult.BOOLEAN_TYPE` const."]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
137 pub const BOOLEAN_TYPE: u16 = 3u64 as u16;
138 #[doc = "The `XPathResult.UNORDERED_NODE_ITERATOR_TYPE` const."]
139 #[doc = ""]
140 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
141 pub const UNORDERED_NODE_ITERATOR_TYPE: u16 = 4u64 as u16;
142 #[doc = "The `XPathResult.ORDERED_NODE_ITERATOR_TYPE` const."]
143 #[doc = ""]
144 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
145 pub const ORDERED_NODE_ITERATOR_TYPE: u16 = 5u64 as u16;
146 #[doc = "The `XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE` const."]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
149 pub const UNORDERED_NODE_SNAPSHOT_TYPE: u16 = 6u64 as u16;
150 #[doc = "The `XPathResult.ORDERED_NODE_SNAPSHOT_TYPE` const."]
151 #[doc = ""]
152 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
153 pub const ORDERED_NODE_SNAPSHOT_TYPE: u16 = 7u64 as u16;
154 #[doc = "The `XPathResult.ANY_UNORDERED_NODE_TYPE` const."]
155 #[doc = ""]
156 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
157 pub const ANY_UNORDERED_NODE_TYPE: u16 = 8u64 as u16;
158 #[doc = "The `XPathResult.FIRST_ORDERED_NODE_TYPE` const."]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
161 pub const FIRST_ORDERED_NODE_TYPE: u16 = 9u64 as u16;
162}