Skip to main content

Home > blockly > Events > BlockCreate

Events.BlockCreate class

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

Signature:

export declare class BlockCreate extends BlockBase 

Extends: BlockBase

Constructors

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

Properties

PropertyModifiersTypeDescription
ids?string[](Optional) All of the IDs of created blocks.
json?blocks.State(Optional) The JSON respresentation of the created block(s).
typeEventType
xml?Element | DocumentFragment(Optional) The XML representation of the created block(s).

Methods

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