blockly > ComponentManager > addCapability
ComponentManager.addCapability()-Methode
Fügt einer vorhandenen registrierten Komponente eine Funktion hinzu.
Unterschrift:
addCapability<T>(id: string, capability: string | Capability<T>): void;
Parameter
Parameter | Typ | Beschreibung |
---|---|---|
id | String | Die ID der Komponente, der die Funktion hinzugefügt werden soll. |
capability | string | Capability<T> | Die hinzuzufügende Funktion. |
Gibt zurück:
void