blockly > Events > VarRename

Events.VarRename class

Notifies listeners that a variable model was renamed.

Signature:

export declare class VarRename extends VarBase 

Extends: VarBase

Constructors

Constructor Modifiers Description
(constructor)(opt_variable, newName) Constructs a new instance of the VarRename class

Properties

Property Modifiers Type Description
newName? string (Optional) The new name of the variable.
oldName? string (Optional) The previous name of the variable.
type string

Methods

Method Modifiers Description
run(forward) Run a variable rename event.
toJson() Encode the event as JSON.