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
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 } | { recordUndo?: boolean; } | (Optional) |
Returns:
The block that was just loaded.