Skip to main content

Home > blockly > BlockFlyoutInflater > createBlock

BlockFlyoutInflater.createBlock() method

Creates a block on the given workspace.

Signature:

createBlock(blockDefinition: BlockInfo, workspace: WorkspaceSvg): BlockSvg;

Parameters

ParameterTypeDescription
blockDefinitionBlockInfoA JSON representation of the block to create.
workspaceWorkspaceSvgThe workspace to create the block on.

Returns:

BlockSvg

The newly created block.