Stay organized with collections Save and categorize content based on your preferences.

blockly > Block > setFieldValue

Block.setFieldValue() method

Sets the value of the given field for this block.

Signature:

setFieldValue(newValue: any, name: string): void;

Parameters

Parameter Type Description
newValue any The value to set.
name string The name of the field to set the value of.

Returns:

void