Skip to main content

blockly > BlockFlyoutInflater > createBlock

BlockFlyoutInflater.createBlock() method

Creates a block on the given workspace.

Signature:

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

Parameters

Parameter

Type

Description

blockDefinition

BlockInfo

A JSON representation of the block to create.

workspace

WorkspaceSvg

The workspace to create the block on.

Returns:

BlockSvg

The newly created block.