Skip to main content

Home > blockly > WorkspaceSvg > registerToolboxCategoryCallback

WorkspaceSvg.registerToolboxCategoryCallback() method

Register a callback function associated with a given key, for populating custom toolbox categories in this workspace. See the variable and procedure categories as an example.

Signature:

registerToolboxCategoryCallback(key: string, func: (p1: WorkspaceSvg) => toolbox.FlyoutDefinition): void;

Parameters

ParameterTypeDescription
keystringThe name to use to look up this function.
func(p1: WorkspaceSvg) => toolbox.FlyoutDefinitionThe function to call when the given toolbox category is opened.

Returns:

void