Skip to main content

Home > blockly > WorkspaceSvg > getBlockById

WorkspaceSvg.getBlockById() method

Find the block on this workspace with the specified ID.

Signature:

getBlockById(id: string): BlockSvg | null;

Parameters

ParameterTypeDescription
idstringID of block to find.

Returns:

BlockSvg | null

The sought after block, or null if not found.