Skip to main content

Home > blockly > VariableModel > load

VariableModel.load() method

Loads the persisted state into a new variable in the given workspace.

Signature:

static load(state: IVariableState, workspace: Workspace): void;

Parameters

ParameterTypeDescription
stateIVariableStateThe serialized state of a variable model from save().
workspaceWorkspaceThe workspace to create the new variable in.

Returns:

void