@microsoft/fast-element > FASTElementDefinition
FASTElementDefinition class
Defines metadata for a FASTElement.
Signature:export declare class FASTElementDefinition<TType extends Function = Function>
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(type, nameOrConfig) | Creates an instance of FASTElementDefinition. |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| attributeLookup | Record<string, AttributeDefinition> | A map enabling lookup of property by associated attribute name. | |
| attributes | ReadonlyArray<AttributeDefinition> | The custom attributes of the custom element. | |
| elementOptions | ElementDefinitionOptions | Options controlling how the custom element is defined with the platform. | |
| forType | static | <TType_1 extends Function>(key: TType_1) => FASTElementDefinition<Function> | undefined | Gets the element definition associated with the specified type. |
| isDefined | boolean | Indicates if this element has been defined in at least one registry. | |
| name | string | The name of the custom element. | |
| propertyLookup | Record<string, AttributeDefinition> | A map enabling lookup of attribute by associated property name. | |
| shadowOptions | ShadowRootInit | Options controlling the creation of the custom element's shadow DOM. | |
| styles | ElementStyles | The styles to associate with the custom element. | |
| template | ElementViewTemplate | The template to render for the custom element. | |
| type | TType | The type this element definition describes. |
Methods
| Method | Modifiers | Description |
|---|---|---|
| define(registry) | Defines a custom element based on this definition. |