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