The Blockly.Events namespace provides a variety of event classes used to notify listeners about changes within the Blockly workspace. These events are categorized by the type of element they affect:
- Block Events:
BlockBase (abstract), BlockChange (field/comment changes), BlockCreate, BlockDelete, BlockDrag, BlockFieldIntermediateChange, and BlockMove. - Comment Events:
CommentBase (abstract), CommentChange, CommentCollapse, CommentCreate, CommentDelete, CommentDrag, CommentMove, and CommentResize. - Variable Events:
VarBase (abstract), VarCreate, and VarDelete. - UI and Interaction Events:
UiBase (base class for non-persistent UI events like zooming or scrolling), Click, Selected, ThemeChange, ToolboxItemSelect, BubbleOpen, and TrashcanOpen.
UiBase events are specifically designed for actions that do not need to be synchronized for multi-user editing and do not support undo/redo operations.