blockly > Connection > getShadowState

Connection.getShadowState() method

Returns the serialized object representation of the connection's shadow block.


getShadowState(returnCurrent?: boolean): blocks.State | null;


Parameter Type Description
returnCurrent boolean (Optional) If true, and the shadow block is currently attached to this connection, this serializes the state of that block and returns it (so that field values are correct). Otherwise the saved state is just returned.


blocks.State | null

Serialized object representation of the block, or null.