blockly > Events > BlockDelete

Events.BlockDelete class

Notifies listeners when a block (or connected stack of blocks) is deleted.


export declare class BlockDelete extends BlockBase 

Extends: BlockBase


Constructor Modifiers Description
(constructor)(opt_block) Constructs a new instance of the BlockDelete class


Property Modifiers Type Description
ids? string[] (Optional) All of the IDs of deleted blocks.
oldJson? blocks.State (Optional) The JSON respresentation of the deleted block(s).
oldXml? Element | DocumentFragment (Optional) The XML representation of the deleted block(s).
type string
wasShadow? boolean (Optional) True if the deleted block was a shadow block, false otherwise.


Method Modifiers Description
run(forward) Run a deletion event.
toJson() Encode the event as JSON.