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

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 } { recordUndo?: boolean; } (Optional)

Returns:

void