blockly > Connection > getShadowDom

Connection.getShadowDom() method

Returns the xml representation of the connection's shadow block.

Signature:

getShadowDom(returnCurrent?: boolean): Element | 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 shadowDom is just returned.

Returns:

Element | null

Shadow DOM representation of a block or null.