Skip to main content

Home > 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

ConstructorModifiersDescription
(constructor)(opt_block)Constructs a new instance of the BlockDelete class

Properties

PropertyModifiersTypeDescription
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).
typeEventType
wasShadow?boolean(Optional) True if the deleted block was a shadow block, false otherwise.

Methods

MethodModifiersDescription
run(forward)Run a deletion event.
toJson()Encode the event as JSON.