Skip to main content

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, input?: {
recordUndo?: boolean;
}): void;

Parameters

Parameter

Type

Description

state

{ [key: string]: any; }

The state of the workspace to deserialize into the workspace.

workspace

Workspace

The workspace to add the new state to.

{ recordUndo }

(not declared)

(Optional)

input

{ recordUndo?: boolean; }

(Optional)

Returns:

void