Skip to main content

Home > blockly > Events > VarRename

Events.VarRename class

Notifies listeners that a variable model was renamed.

Signature:

export declare class VarRename extends VarBase 

Extends: VarBase

Constructors

ConstructorModifiersDescription
(constructor)(opt_variable, newName)Constructs a new instance of the VarRename class

Properties

PropertyModifiersTypeDescription
newName?string(Optional) The new name of the variable.
oldName?string(Optional) The previous name of the variable.
typeEventType

Methods

MethodModifiersDescription
run(forward)Run a variable rename event.
toJson()Encode the event as JSON.