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

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

Properties

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).

Methods

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