maxcountryman_web_sys/features/
gen_XPathResult.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = XPathResult , typescript_type = "XPathResult")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `XPathResult` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
13 pub type XPathResult;
14 # [wasm_bindgen (structural , method , getter , js_class = "XPathResult" , js_name = resultType)]
15 #[doc = "Getter for the `resultType` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/resultType)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
20 pub fn result_type(this: &XPathResult) -> u16;
21 # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = numberValue)]
22 #[doc = "Getter for the `numberValue` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/numberValue)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
27 pub fn number_value(this: &XPathResult) -> Result<f64, JsValue>;
28 # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = stringValue)]
29 #[doc = "Getter for the `stringValue` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/stringValue)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
34 pub fn string_value(this: &XPathResult) -> Result<String, JsValue>;
35 # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = booleanValue)]
36 #[doc = "Getter for the `booleanValue` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/booleanValue)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
41 pub fn boolean_value(this: &XPathResult) -> Result<bool, JsValue>;
42 #[cfg(feature = "Node")]
43 # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = singleNodeValue)]
44 #[doc = "Getter for the `singleNodeValue` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/singleNodeValue)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
49 pub fn single_node_value(this: &XPathResult) -> Result<Option<Node>, JsValue>;
50 # [wasm_bindgen (structural , method , getter , js_class = "XPathResult" , js_name = invalidIteratorState)]
51 #[doc = "Getter for the `invalidIteratorState` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/invalidIteratorState)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
56 pub fn invalid_iterator_state(this: &XPathResult) -> bool;
57 # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = snapshotLength)]
58 #[doc = "Getter for the `snapshotLength` field of this object."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotLength)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
63 pub fn snapshot_length(this: &XPathResult) -> Result<u32, JsValue>;
64 #[cfg(feature = "Node")]
65 # [wasm_bindgen (catch , method , structural , js_class = "XPathResult" , js_name = iterateNext)]
66 #[doc = "The `iterateNext()` method."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/iterateNext)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
71 pub fn iterate_next(this: &XPathResult) -> Result<Option<Node>, JsValue>;
72 #[cfg(feature = "Node")]
73 # [wasm_bindgen (catch , method , structural , js_class = "XPathResult" , js_name = snapshotItem)]
74 #[doc = "The `snapshotItem()` method."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotItem)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
79 pub fn snapshot_item(this: &XPathResult, index: u32) -> Result<Option<Node>, JsValue>;
80}
81impl XPathResult {
82 #[doc = "The `XPathResult.ANY_TYPE` const."]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
85 pub const ANY_TYPE: u16 = 0i64 as u16;
86 #[doc = "The `XPathResult.NUMBER_TYPE` const."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
89 pub const NUMBER_TYPE: u16 = 1u64 as u16;
90 #[doc = "The `XPathResult.STRING_TYPE` const."]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
93 pub const STRING_TYPE: u16 = 2u64 as u16;
94 #[doc = "The `XPathResult.BOOLEAN_TYPE` const."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
97 pub const BOOLEAN_TYPE: u16 = 3u64 as u16;
98 #[doc = "The `XPathResult.UNORDERED_NODE_ITERATOR_TYPE` const."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
101 pub const UNORDERED_NODE_ITERATOR_TYPE: u16 = 4u64 as u16;
102 #[doc = "The `XPathResult.ORDERED_NODE_ITERATOR_TYPE` const."]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
105 pub const ORDERED_NODE_ITERATOR_TYPE: u16 = 5u64 as u16;
106 #[doc = "The `XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE` const."]
107 #[doc = ""]
108 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
109 pub const UNORDERED_NODE_SNAPSHOT_TYPE: u16 = 6u64 as u16;
110 #[doc = "The `XPathResult.ORDERED_NODE_SNAPSHOT_TYPE` const."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
113 pub const ORDERED_NODE_SNAPSHOT_TYPE: u16 = 7u64 as u16;
114 #[doc = "The `XPathResult.ANY_UNORDERED_NODE_TYPE` const."]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
117 pub const ANY_UNORDERED_NODE_TYPE: u16 = 8u64 as u16;
118 #[doc = "The `XPathResult.FIRST_ORDERED_NODE_TYPE` const."]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
121 pub const FIRST_ORDERED_NODE_TYPE: u16 = 9u64 as u16;
122}