@microsoft/fast-element

Classes

Class

Description

AttributeDefinition

An implementation of Accessor that supports reactivity, change callbacks, attribute reflection, and type conversion for custom elements.

ChildrenDirective

The runtime behavior for child node observation.

CSSBindingDirective

Enables bindings in CSS.

ElementController

Controls the lifecycle and rendering of a FASTElement.

ElementStyles

Represents styles that can be applied to a custom element.

FASTElementDefinition

Defines metadata for a FASTElement.

HTMLBindingDirective

A directive that applies bindings.

HTMLView

The standard View implementation, which also implements ElementView and SyntheticView.

HydratableElementController

(BETA) An ElementController capable of hydrating FAST elements from Declarative Shadow DOM.

HydrationBindingError

InlineTemplateDirective

Inlines a template into another template.

PropertyChangeNotifier

An implementation of Notifier that allows subscribers to be notified of individual property changes on an object.

RefDirective

The runtime behavior for template references.

RenderBehavior

A Behavior that enables advanced rendering.

RenderDirective

A Directive that enables use of the RenderBehavior.

RepeatBehavior

A behavior that renders a template for each item in an array.

RepeatDirective

A directive that configures list rendering.

SlottedDirective

The runtime behavior for slotted node observation.

Sort

A sort array indicates new index positions of array items.

Splice

A splice map is a representation of how a previous array of items was transformed into a new array of items. Conceptually it is a list of tuples of

(index, removed, addedCount)

which are kept in ascending index order of. The tuple represents that at the |index|, |removed| sequence of items were removed, and counting forward from |index|, |addedCount| items were added.

SubscriberSet

An implementation of Notifier that efficiently keeps track of subscribers interested in a specific change notification on an observable subject.

ViewTemplate

A template capable of creating HTMLView instances or rendering directly to DOM.

Abstract Classes

Abstract Class

Description

Binding

Captures a binding expression along with related information and capabilities.

NodeObservationDirective

A base class for node observation.

StatelessAttachedAttributeDirective

A base class used for attribute directives that don't need internal state.

Enumerations

Enumeration

Description

Stages

The various lifecycle stages of an ElementController.

Functions

Function

Description

attr(config)

Decorator: Specifies an HTML attribute.

attr(target, prop)

Decorator: Specifies an HTML attribute.

children(propertyOrOptions)

A directive that observes the childNodes of an element and updates a property whenever they change.

cssDirective()

Decorator: Defines a CSSDirective.

customElement(nameOrDef)

Decorator: Defines a platform custom element based on FASTElement.

elements(selector)

Creates a function that can be used to filter a Node array, selecting only elements.

htmlDirective(options)

Decorator: Defines an HTMLDirective.

isHydratable(view)

(BETA) Tests if a template or ViewController is hydratable.

isHydratable(template)

(BETA)

isHydratable(template)

(BETA)

isHydratable(template)

(BETA)

lengthOf(array)

Enables observing the length of an array.

listener(expression, options)

Creates an event listener binding.

normalizeBinding(value)

Normalizes the input value into a binding.

observable(target, nameOrAccessor)

Decorator: Defines an observable property on the target.

oneTime(expression, policy)

Creates a one time binding

oneWay(expression, policy, isVolatile)

Creates an standard binding.

ref(propertyName)

A directive that observes the updates a property with a reference to the element.

render(value, template)

Creates a RenderDirective for use in advanced rendering scenarios.

repeat(items, template, options)

A directive that enables list rendering.

slotted(propertyOrOptions)

A directive that observes the assignedNodes() of a slot and updates a property whenever they change.

sortedCount(array)

Enables observing the sorted property of an array.

volatile(target, name, descriptor)

Decorator: Marks a property getter as having volatile observable dependencies.

when(condition, templateOrTemplateBinding, elseTemplateOrTemplateBinding)

A directive that enables basic conditional rendering in a template.

Interfaces

Interface

Description

Accessor

Represents a getter/setter property accessor on an object.

ArrayObserver

An observer for arrays.

Aspected

Represents something that applies to a specific aspect of the DOM.

BindingDirective

The directive from which a binding originates.

CaptureType

A marker interface used to capture types when interpolating Directive helpers into templates.

ChildListDirectiveOptions

The options used to configure child list observation.

ContentTemplate

A simple template that can create ContentView instances.

ContentView

A simple View that can be interpolated into HTML content.

CSSDirective

Directive for use in css.

CSSDirectiveDefinition

Defines metadata for a CSSDirective.

Disposable

Provides a mechanism for releasing resources.

DOMPolicy

A security policy that FAST can use to interact with the DOM.

ElementControllerStrategy

A type that instantiates an ElementController

ElementView

A View representing DOM nodes specifically for rendering the view of a custom element.

ElementViewTemplate

A template capable of creating views specifically for rendering custom elements.

ExecutionContext

Provides additional contextual information available to behaviors and expressions.

ExpressionController

Controls the lifecycle of an expression and provides relevant context.

ExpressionNotifier

Enables evaluation of and subscription to a binding.

ExpressionObserver

Observes an expression for changes.

FASTElement

Represents a custom element based on the FASTElement infrastructure.

FASTGlobal

The FAST global.

HostBehavior

Represents an object that can contribute behavior to a host.

HostController

Controls the lifecycle and context of behaviors and styles associated with a component host.

HTMLDirective

Instructs the template engine to apply behavior to a node.

HTMLDirectiveDefinition

Defines metadata for an HTMLDirective.

HTMLTemplateCompilationResult

The result of a template compilation operation.

HydratableView

HydrationControllerCallbacks

Lifecycle callbacks for element hydration events

LengthObserver

Observes array lengths.

NodeBehaviorOptions

Options for configuring node observation behavior.

Notifier

Provides change notifications for an observed subject.

ObservationRecord

A record of observable property access.

PartialFASTElementDefinition

Represents metadata configuration for a custom element.

PartialHTMLDirectiveDefinition

Represents metadata configuration for an HTMLDirective.

RepeatOptions

Options for configuring repeat behavior.

ShadowRootOptions

Shadow root initialization options.

SlottedDirectiveOptions

The options used to configure slotted node observation.

SortObserver

Observes array sort.

SpliceStrategy

An approach to tracking changes in an array.

StyleStrategy

Implemented to provide specific behavior when adding/removing styles for elements.

StyleTarget

A node that can be targeted by styles.

Subscriber

Implemented by objects that are interested in change notifications.

SubtreeDirectiveOptions

The options used to configure subtree observation.

SyntheticView

A view representing a range of DOM nodes which can be added/removed ad hoc.

SyntheticViewTemplate

A template capable of rendering views not specifically connected to custom elements.

TemplateLifecycleCallbacks

Lifecycle callbacks for template events.

UpdateQueue

A work queue used to synchronize writes to the DOM.

ValueConverter

Represents objects that can convert values to and from view or model representations.

View

Represents a collection of DOM nodes which can be bound to a data source.

ViewBehavior

Represents an object that can contribute behavior to a view.

ViewBehaviorFactory

A factory that can create a ViewBehavior associated with a particular location within a DOM fragment.

ViewController

Controls the lifecycle of a view and provides relevant context.

Variables

Variable

Description

ArrayObserver

An observer for arrays.

AttributeConfiguration

Metadata used to configure a custom attribute's behavior.

booleanConverter

A ValueConverter that converts to and from boolean values.

Compiler

Common APIs related to compilation.

css

Transforms a template literal string into styles.

CSSDirective

Instructs the css engine to provide dynamic styles or associate behaviors with styles.

deferHydrationAttribute

(BETA) The attribute used to defer hydration of an element.

DOM

Common DOM APIs.

DOMAspect

The type of HTML aspect to target.

emptyArray

A readonly, empty array.

ExecutionContext

Provides additional contextual information available to behaviors and expressions.

FAST

The FAST global.

FASTElement

A minimal base class for FASTElements that also provides static helpers for working with FASTElements.

html

Transforms a template literal string into a ViewTemplate.

HTMLDirective

Instructs the template engine to apply behavior to a node.

Markup

Common APIs related to markup generation.

needsHydrationAttribute

The attribute used to indicate that an element needs hydration.

nullableBooleanConverter

A ValueConverter that converts to and from boolean values. null, undefined, "", and void values are converted to null.

nullableNumberConverter

A ValueConverter that converts to and from number values.

Observable

Common Observable APIs.

Parser

Common APIs related to content parsing.

SourceLifetime

Describes how the source's lifetime relates to its controller's lifetime.

SpliceStrategy

Functionality related to tracking changes in arrays.

SpliceStrategySupport

Indicates what level of feature support the splice strategy provides.

TemplateOptions

(ALPHA) Values for the templateOptions property.

Updates

The default UpdateQueue.

Type Aliases

Type Alias

Description

AddBehavior

Used to add behaviors when constructing styles.

AddViewBehaviorFactory

Used to add behavior factories when constructing templates.

AttributeConfiguration

Metadata used to configure a custom attribute's behavior.

AttributeMode

The mode that specifies the runtime behavior of the attribute.

Callable

Represents a callable type such as a function or an object with a "call" method.

ChildrenDirectiveOptions

The options used to configure child/subtree node observation.

Class

Represents a constructable class with a prototype.

CompilationStrategy

A function capable of compiling a template from the preprocessed form produced by the html template function into a result that can instantiate views.

CompiledViewBehaviorFactory

Represents a ViewBehaviorFactory after the compilation process has completed.

ComposableStyles

Represents styles that can be composed into the ShadowDOM of a custom element.

Constructable

Represents a type which can be constructed with the new operator.

ConstructibleStyleStrategy

A type that instantiates a StyleStrategy.

CSSTemplateTag

Transforms a template literal string into styles.

CSSValue

Represents the types of values that can be interpolated into a template.

DecoratorAttributeConfiguration

Metadata used to configure a custom attribute's behavior through a decorator.

DOMAspect

The type of HTML aspect to target.

DOMSink

A function used to send values to a DOM sink.

ElementsFilter

Elements filter function type.

Expression

The signature of an arrow function capable of being evaluated against source data and within an execution context.

HTMLTemplateTag

Transforms a template literal string into a ViewTemplate.

SourceLifetime

Describes how the source's lifetime relates to its controller's lifetime.

SpliceStrategySupport

The available values for SpliceStrategySupport.

TemplateOptions

(ALPHA) Type for the TemplateOptions const enum.

TemplateValue

Represents the types of values that can be interpolated into a template.

TrustedTypesPolicy

A policy for use with the standard trustedTypes platform API.

ViewBehaviorTargets

The target nodes available to a behavior.