@microsoft/fast-element > customElement

customElement() function

Decorator: Defines a platform custom element based on FASTElement.

Signature:

export declare function customElement(nameOrDef: string | PartialFASTElementDefinition): (type: Constructable<HTMLElement>) => void;

Parameters

Parameter

Type

Description

nameOrDef

string | PartialFASTElementDefinition

The name of the element to define or a definition object that describes the element to define.

Returns:

(type: Constructable<HTMLElement>) => void