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