CustomElementRegistry Class
https://html.spec.whatwg.org/multipage/custom-elements.html#customelementregistry: defines custom elements with .NET constructors (see CustomElementConstructor).
public sealed class CustomElementRegistryRemarks
The document of a BrowsingContext has a global registry (Window.CustomElements). Other documents (parsed without a browsing context, DOMParser, createHTMLDocument()...) have no registry: use a scoped registry (new CustomElementRegistry()) and CustomElementRegistry.Initialize, or HtmlParserOptions.CustomElementRegistry.
See also
Constructors
| Name | Description |
|---|---|
| CustomElementRegistry() | Creates a scoped registry (https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry). |
CustomElementRegistry()
CustomElementRegistry.csCreates a scoped registry (https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry).
public CustomElementRegistry()Properties
| Name | Description |
|---|---|
| IsScoped | https://html.spec.whatwg.org/multipage/custom-elements.html#is-scoped |
IsScoped
CustomElementRegistry.csMethods
| Name | Description |
|---|---|
| Define(string, CustomElementConstructor, ElementDefinitionOptions?) | https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-define |
| Get(string) | https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-get |
| GetName(CustomElementConstructor) | https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-getname |
| Initialize(Node) | https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-initialize |
| Upgrade(Node) | https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-upgrade |
| WhenDefined(string) | https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-whendefined. The task completes synchronously when the element is defined, like the promise is resolved by define(). |
Define(string, CustomElementConstructor, ElementDefinitionOptions?)
CustomElementRegistry.cshttps://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-define
public void Define(string name, CustomElementConstructor constructor, ElementDefinitionOptions? options = null)Get(string)
CustomElementRegistry.cshttps://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-get
public CustomElementConstructor? Get(string name)GetName(CustomElementConstructor)
CustomElementRegistry.cshttps://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-getname
public string? GetName(CustomElementConstructor constructor)Initialize(Node)
CustomElementRegistry.cshttps://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-initialize
Upgrade(Node)
CustomElementRegistry.cshttps://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-upgrade
WhenDefined(string)
CustomElementRegistry.cshttps://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-whendefined. The task completes synchronously when the element is defined, like the promise is resolved by define().
public Task<CustomElementConstructor> WhenDefined(string name)