Skip to main content

Home > blockly > serialization > blocks > BlockSerializer > load

serialization.blocks.BlockSerializer.load() method

Deserializes the blocks defined by the given state into the given workspace.

Signature:

load(state: {
languageVersion: number;
blocks: State[];
}, workspace: Workspace): void;

Parameters

ParameterTypeDescription
state{ languageVersion: number; blocks: State[]; }The state of the blocks to deserialize.
workspaceWorkspaceThe workspace to deserialize into.

Returns:

void