Skip to main content

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

Parameter

Type

Description

key

string

The name to use to look up this function.

func

(p1: WorkspaceSvg) => toolbox.FlyoutDefinition

The function to call when the given toolbox category is opened.

Returns:

void