Skip to main content

blockly > ToolboxItem > (constructor)

ToolboxItem.(constructor)

Constructs a new instance of the ToolboxItem class

Signature:

constructor(toolboxItemDef: toolbox.ToolboxItemInfo, parentToolbox: IToolbox, opt_parent?: ICollapsibleToolboxItem);

Parameters

Parameter

Type

Description

toolboxItemDef

toolbox.ToolboxItemInfo

The JSON defining the toolbox item.

parentToolbox

IToolbox

The toolbox that holds the toolbox item.

opt_parent

ICollapsibleToolboxItem

(Optional) The parent toolbox item or null if the category does not have a parent.