Interface CustomElementRegistry
interface CustomElementRegistry {
define(
name: string,
constructor: CustomElementConstructor,
options?: ElementDefinitionOptions,
): void;
get(name: string): CustomElementConstructor;
getName(constructor: CustomElementConstructor): string;
upgrade(root: Node): void;
whenDefined(name: string): Promise<CustomElementConstructor>;
}
define(
name: string,
constructor: CustomElementConstructor,
options?: ElementDefinitionOptions,
): void;
get(name: string): CustomElementConstructor;
getName(constructor: CustomElementConstructor): string;
upgrade(root: Node): void;
whenDefined(name: string): Promise<CustomElementConstructor>;
}
Index
Methods
Methods
define
- define(
name: string,
constructor: CustomElementConstructor,
options?: ElementDefinitionOptions,
): void Parameters
- name: string
- constructor: CustomElementConstructor
Optional
options: ElementDefinitionOptions
Returns void
get
- get(name: string): CustomElementConstructor
Parameters
- name: string
Returns CustomElementConstructor
getName
- getName(constructor: CustomElementConstructor): string
Parameters
- constructor: CustomElementConstructor
Returns string
upgrade
whenDefined
- whenDefined(name: string): Promise<CustomElementConstructor>
Parameters
- name: string
Returns Promise<CustomElementConstructor>
MDN Reference