Skip to main content

Home > blockly > Block > renameVarById

Block.renameVarById() method

Notification that a variable is renaming. If the ID matches one of this block's variables, rename it.

Signature:

renameVarById(oldId: string, newId: string): void;

Parameters

ParameterTypeDescription
oldIdstringID of variable to rename.
newIdstringID of new variable. May be the same as oldId, but with an updated name.

Returns:

void