web_sys/features/
gen_XPathExpression.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 = "XPathExpression",
10 typescript_type = "XPathExpression"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `XPathExpression` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathExpression)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `XPathExpression`*"]
18 pub type XPathExpression;
19 #[cfg(all(feature = "Node", feature = "XPathResult",))]
20 #[wasm_bindgen(catch, method, js_class = "XPathExpression")]
21 #[doc = "The `evaluate()` method."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathExpression/evaluate)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathExpression`, `XPathResult`*"]
26 pub fn evaluate(this: &XPathExpression, context_node: &Node) -> Result<XPathResult, JsValue>;
27 #[cfg(all(feature = "Node", feature = "XPathResult",))]
28 #[wasm_bindgen(catch, method, js_class = "XPathExpression", js_name = "evaluate")]
29 #[doc = "The `evaluate()` method."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathExpression/evaluate)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathExpression`, `XPathResult`*"]
34 pub fn evaluate_with_type(
35 this: &XPathExpression,
36 context_node: &Node,
37 type_: u16,
38 ) -> Result<XPathResult, JsValue>;
39 #[cfg(all(feature = "Node", feature = "XPathResult",))]
40 #[wasm_bindgen(catch, method, js_class = "XPathExpression", js_name = "evaluate")]
41 #[doc = "The `evaluate()` method."]
42 #[doc = ""]
43 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathExpression/evaluate)"]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathExpression`, `XPathResult`*"]
46 pub fn evaluate_with_type_and_result(
47 this: &XPathExpression,
48 context_node: &Node,
49 type_: u16,
50 result: Option<&::js_sys::Object>,
51 ) -> Result<XPathResult, JsValue>;
52}