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