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