Skip to main content

Home > blockly > BlockSvg > setWarningText

BlockSvg.setWarningText() method

Set this block's warning text.

Signature:

setWarningText(text: string | null, id?: string): void;

Parameters

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

Returns:

void