@microsoft/fast-element > FASTElementDefinition
FASTElementDefinition class
Defines metadata for a FASTElement.
Signature:
export declare class FASTElementDefinition<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Record<string, AttributeDefinition> |
A map enabling lookup of property by associated attribute name. | |
|
|
ReadonlyArray<AttributeDefinition> |
The custom attributes of the custom element. | |
|
|
ElementDefinitionOptions |
Options controlling how the custom element is defined with the platform. | |
|
|
(key: Function) => FASTElementDefinition<Constructable<HTMLElement>> | undefined |
Gets the element definition associated with the specified type. | |
|
|
(object: any) => FASTElementDefinition<Constructable<HTMLElement>> | undefined |
Gets the element definition associated with the instance. | |
|
|
boolean |
Indicates if this element has been defined in at least one registry. | |
|
|
Record<string, Function> |
The definition has been registered to the FAST element registry. | |
|
|
(Optional) Lifecycle callbacks for template events. | ||
|
|
string |
The name of the custom element. | |
|
|
Record<string, AttributeDefinition> |
A map enabling lookup of attribute by associated property name. | |
|
|
(name: string) => Promise<Function> |
(ALPHA) Indicates when a custom elements definition has been registered with the fastElementRegistry. | |
|
|
CustomElementRegistry |
The registry to register this component in by default. | |
|
(Optional) Options controlling the creation of the custom element's shadow DOM. | |||
|
|
(Optional) The styles to associate with the custom element. | ||
|
(Optional) The template to render for the custom element. | |||
|
(ALPHA) (Optional) The template options. | |||
|
|
TType |
The type this element definition describes. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
|
Creates an instance of FASTElementDefinition. | |
|
Defines a custom element based on this definition. |