@microsoft/fast-foundation > FoundationElement

FoundationElement class

Defines a foundation element class that: 1. Connects the element to its ComponentPresentation 2. Allows resolving the element template from the instance or ComponentPresentation 3. Allows resolving the element styles from the instance or ComponentPresentation

Signature:

export declare class FoundationElement extends FASTElement 

Properties

Property Modifiers Type Description
$presentation ComponentPresentation | null A property which resolves the ComponentPresentation instance for the current component.
styles ElementStyles | void | null Sets the default styles for the element instance. When undefined, the element will attempt to resolve default styles from the associated presentation or custom element definition.
template ElementViewTemplate | void | null Sets the template of the element instance. When undefined, the element will attempt to resolve the template from the associated presentation or custom element definition.

Methods

Method Modifiers Description
compose(this, elementDefinition) static Defines an element registry function with a set of element definition defaults.
connectedCallback() The connected callback for this FASTElement.
stylesChanged()
templateChanged()