Skip to main content

blockly > Workspace > getBlockById

Workspace.getBlockById() method

Find the block on this workspace with the specified ID.

Signature:

getBlockById(id: string): Block | null;

Parameters

Parameter

Type

Description

id

string

ID of block to find.

Returns:

Block | null

The sought after block, or null if not found.