Skip to main content

@microsoft/fast-foundation > DesignSystemRegistrationContext > tryDefineElement

DesignSystemRegistrationContext.tryDefineElement() method

Warning: This API is now obsolete.

  • Use the signature with the ElementDefinitionParams param type instead

Used to attempt to define a custom element.

Signature:
tryDefineElement(name: string, type: Constructable, callback: ElementDefinitionCallback): void;

Parameters

ParameterTypeDescription
namestringThe name of the element to define.
typeConstructableThe type of the constructor to use to define the element.
callbackElementDefinitionCallbackA callback to invoke if definition will happen.
Returns:

void