Skip to main content

blockly > WorkspaceSvg > getBlockById

WorkspaceSvg.getBlockById() method

Find the block on this workspace with the specified ID.

Signature:

getBlockById(id: string): BlockSvg | null;

Parameters

Parameter

Type

Description

id

string

ID of block to find.

Returns:

BlockSvg | null

The sought after block, or null if not found.