Skip to main content

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

Parameter

Type

Description

state

{ languageVersion: number; blocks: [State](/reference/js/blockly.serialization_namespace.blocks_namespace.state_interface)[]; }

The state of the blocks to deserialize.

workspace

Workspace

The workspace to deserialize into.

Returns:

void