blockly > Events > BlockDelete

Events.BlockDelete class

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

Signature:

export declare class BlockDelete extends BlockBase 

Extends: BlockBase

Constructors

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

Properties

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.

Methods

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