blockly > Events > BlockCreate

Events.BlockCreate class

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


export declare class BlockCreate extends BlockBase 

Extends: BlockBase


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


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


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