Skip to main content

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

Parameters

Parameter

Type

Description

state

State

The state of a block to deserialize into the workspace.

workspace

Workspace

The workspace to add the block to.

{ recordUndo }

(not declared)

(Optional)

input

{ recordUndo?: boolean; }

(Optional)

Returns:

Block

The block that was just loaded.