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