blockly > Extensions > apply
Extensions.apply() function
Applies an extension method to a block. This should only be called during block construction.
Signature:
export declare function apply(name: string, block: Block, isMutator: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the extension. |
block | Block | The block to apply the named extension to. |
isMutator | boolean | True if this extension defines a mutator. |
Returns:
void
Exceptions
{Error} if the extension is not found.