Skip to main content

Home > blockly > serialization > blocks > append

serialization.blocks.append() function

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

Signature:

export declare function append(state: State, workspace: Workspace, { recordUndo }?: {
recordUndo?: boolean;
}): Block;

Parameters

ParameterTypeDescription
stateStateThe state of a block to deserialize into the workspace.
workspaceWorkspaceThe workspace to add the block to.
{ recordUndo }{ recordUndo?: boolean; }(Optional)

Returns:

Block

The block that was just loaded.