Skip to main content

Home > blockly > Block > getField

Block.getField() method

Returns the named field from a block.

Signature:

getField(name: string): Field | null;

Parameters

ParameterTypeDescription
namestringThe name of the field.

Returns:

Field | null

Named field, or null if field does not exist.