Skip to main content

Home > blockly > Block > setWarningText

Block.setWarningText() method

Set this block's warning text.

Signature:

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

Parameters

ParameterTypeDescription
_textstring | nullThe text, or null to delete.
_opt_idstring(Optional) An optional ID for the warning text to be able to maintain multiple warnings.

Returns:

void