web_sys/features/
gen_DomParser.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 = DOMParser , typescript_type = "DOMParser")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `DomParser` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `DomParser`*"]
14    pub type DomParser;
15    #[wasm_bindgen(catch, constructor, js_class = "DOMParser")]
16    #[doc = "The `new DomParser(..)` constructor, creating a new instance of `DomParser`."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/DOMParser)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `DomParser`*"]
21    pub fn new() -> Result<DomParser, JsValue>;
22    #[cfg(all(feature = "Document", feature = "SupportedType",))]
23    # [wasm_bindgen (catch , method , structural , js_class = "DOMParser" , js_name = parseFromString)]
24    #[doc = "The `parseFromString()` method."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `Document`, `DomParser`, `SupportedType`*"]
29    pub fn parse_from_string(
30        this: &DomParser,
31        str: &str,
32        type_: SupportedType,
33    ) -> Result<Document, JsValue>;
34}