blockly > Block > setWarningText

Block.setWarningText() method

Set this block's warning text.

Signature:

setWarningText(_text: string | null, _opt_id?: string): void;

Parameters

Parameter Type Description
_text string | null The text, or null to delete.
_opt_id string (Optional) An optional ID for the warning text to be able to maintain multiple warnings.

Returns:

void