Skip to main content

@microsoft/fast-element > Controller > forCustomElement

Controller.forCustomElement() method

Locates or creates a controller for the specified element.

Signature:
static forCustomElement(element: HTMLElement): Controller;

Parameters

ParameterTypeDescription
elementHTMLElementThe element to return the controller for.
Returns:

Controller

Remarks

The specified element must have a FASTElementDefinition registered either through the use of the customElement() decorator or a call to FASTElement.define.