blockly > Field > getSourceBlock

Field.getSourceBlock() method

Get the block this field is attached to.

Signature:

getSourceBlock(): Block | null;

Returns:

Block | null

The block containing this field.

Exceptions

An error if the source block is not defined.