blockly > Connection > getShadowState

Connection.getShadowState() method

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

Signature:

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

Parameters

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.

Returns:

blocks.State | null

Serialized object representation of the block, or null.