Skip to main content

web_sys/features/
gen_DomImplementation.rs

1#![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 = "DOMImplementation",
10        typescript_type = "DOMImplementation"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `DomImplementation` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `DomImplementation`*"]
18    pub type DomImplementation;
19    #[cfg(feature = "Document")]
20    #[wasm_bindgen(
21        catch,
22        method,
23        js_class = "DOMImplementation",
24        js_name = "createDocument"
25    )]
26    #[doc = "The `createDocument()` method."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `Document`, `DomImplementation`*"]
31    pub fn create_document(
32        this: &DomImplementation,
33        namespace: Option<&str>,
34        qualified_name: &str,
35    ) -> Result<Document, JsValue>;
36    #[cfg(all(feature = "Document", feature = "DocumentType",))]
37    #[wasm_bindgen(
38        catch,
39        method,
40        js_class = "DOMImplementation",
41        js_name = "createDocument"
42    )]
43    #[doc = "The `createDocument()` method."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `Document`, `DocumentType`, `DomImplementation`*"]
48    pub fn create_document_with_doctype(
49        this: &DomImplementation,
50        namespace: Option<&str>,
51        qualified_name: &str,
52        doctype: Option<&DocumentType>,
53    ) -> Result<Document, JsValue>;
54    #[cfg(feature = "DocumentType")]
55    #[wasm_bindgen(
56        catch,
57        method,
58        js_class = "DOMImplementation",
59        js_name = "createDocumentType"
60    )]
61    #[doc = "The `createDocumentType()` method."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `DocumentType`, `DomImplementation`*"]
66    pub fn create_document_type(
67        this: &DomImplementation,
68        qualified_name: &str,
69        public_id: &str,
70        system_id: &str,
71    ) -> Result<DocumentType, JsValue>;
72    #[cfg(feature = "Document")]
73    #[wasm_bindgen(
74        catch,
75        method,
76        js_class = "DOMImplementation",
77        js_name = "createHTMLDocument"
78    )]
79    #[doc = "The `createHTMLDocument()` method."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `Document`, `DomImplementation`*"]
84    pub fn create_html_document(this: &DomImplementation) -> Result<Document, JsValue>;
85    #[cfg(feature = "Document")]
86    #[wasm_bindgen(
87        catch,
88        method,
89        js_class = "DOMImplementation",
90        js_name = "createHTMLDocument"
91    )]
92    #[doc = "The `createHTMLDocument()` method."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `Document`, `DomImplementation`*"]
97    pub fn create_html_document_with_title(
98        this: &DomImplementation,
99        title: &str,
100    ) -> Result<Document, JsValue>;
101    #[wasm_bindgen(method, js_class = "DOMImplementation", js_name = "hasFeature")]
102    #[doc = "The `hasFeature()` method."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `DomImplementation`*"]
107    pub fn has_feature(this: &DomImplementation) -> bool;
108}