Skip to main content

Home > blockly > ComponentManager > addCapability

ComponentManager.addCapability() method

Adds a capability to a existing registered component.

Signature:

addCapability<T>(id: string, capability: string | Capability<T>): void;

Parameters

ParameterTypeDescription
idstringThe ID of the component to add the capability to.
capabilitystring | Capability<T>The capability to add.

Returns:

void