blockly > ISelectableToolboxItem

ISelectableToolboxItem interface

Interface for an item in the toolbox that can be selected.

Signature:

export interface ISelectableToolboxItem extends IToolboxItem 

Extends: IToolboxItem

Methods

Method Description
getClickTarget() Gets the HTML element that is clickable. The parent toolbox element receives clicks. The parent toolbox will add an ID to this element so it can pass the onClick event to the correct toolboxItem.
getContents() Gets the contents of the toolbox item. These are items that are meant to be displayed in the flyout.
getName() Gets the name of the toolbox item. Used for emitting events.
onClick(_e) Handles when the toolbox item is clicked.
setSelected(_isSelected) Sets the current toolbox item as selected.