blockly > Espace de travail > getBlockById

Méthode Workspace.getBlockById()

Recherchez le bloc correspondant à l'ID indiqué dans cet espace de travail.

Signature :

getBlockById(id: string): Block | null;

Paramètres

Paramètre Type Description
id chaîne ID du bloc à rechercher.

Renvoie :

Bloquer | nul

Bloc recherché, ou valeur "null" si introuvable.