Skip to main content

Home > blockly > Workspace > getBlockById

Workspace.getBlockById() method

Find the block on this workspace with the specified ID.

Signature:

getBlockById(id: string): Block | null;

Parameters

ParameterTypeDescription
idstringID of block to find.

Returns:

Block | null

The sought after block, or null if not found.