web_sys/features/
gen_CustomElementRegistry.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 = CustomElementRegistry , typescript_type = "CustomElementRegistry")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `CustomElementRegistry` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
14    pub type CustomElementRegistry;
15    # [wasm_bindgen (catch , method , structural , js_class = "CustomElementRegistry" , js_name = define)]
16    #[doc = "The `define()` method."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
21    pub fn define(
22        this: &CustomElementRegistry,
23        name: &str,
24        function_constructor: &::js_sys::Function,
25    ) -> Result<(), JsValue>;
26    #[cfg(feature = "ElementDefinitionOptions")]
27    # [wasm_bindgen (catch , method , structural , js_class = "CustomElementRegistry" , js_name = define)]
28    #[doc = "The `define()` method."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`, `ElementDefinitionOptions`*"]
33    pub fn define_with_options(
34        this: &CustomElementRegistry,
35        name: &str,
36        function_constructor: &::js_sys::Function,
37        options: &ElementDefinitionOptions,
38    ) -> Result<(), JsValue>;
39    # [wasm_bindgen (method , structural , js_class = "CustomElementRegistry" , js_name = get)]
40    #[doc = "The `get()` method."]
41    #[doc = ""]
42    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get)"]
43    #[doc = ""]
44    #[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
45    pub fn get(this: &CustomElementRegistry, name: &str) -> ::wasm_bindgen::JsValue;
46    #[cfg(feature = "Node")]
47    # [wasm_bindgen (method , structural , js_class = "CustomElementRegistry" , js_name = upgrade)]
48    #[doc = "The `upgrade()` method."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/upgrade)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`, `Node`*"]
53    pub fn upgrade(this: &CustomElementRegistry, root: &Node);
54    # [wasm_bindgen (catch , method , structural , js_class = "CustomElementRegistry" , js_name = whenDefined)]
55    #[doc = "The `whenDefined()` method."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/whenDefined)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
60    pub fn when_defined(
61        this: &CustomElementRegistry,
62        name: &str,
63    ) -> Result<::js_sys::Promise, JsValue>;
64}