Skip to main content

Home > blockly > serialization > workspaces > load

serialization.workspaces.load() function

Loads the variable represented by the given state into the given workspace.

Signature:

export declare function load(state: {
[key: string]: any;
}, workspace: Workspace, { recordUndo }?: {
recordUndo?: boolean;
}): void;

Parameters

ParameterTypeDescription
state{ [key: string]: any; }The state of the workspace to deserialize into the workspace.
workspaceWorkspaceThe workspace to add the new state to.
{ recordUndo }{ recordUndo?: boolean; }(Optional)

Returns:

void