blockly > WorkspaceSvg > newBlock

Méthode WorkspaceSvg.newBlock()

Obtenez un bloc que vous venez de créer.

Signature :

newBlock(prototypeName: string, opt_id?: string): BlockSvg;

Paramètres

Paramètres Type Description
prototypeName chaîne Nom de l'objet de langage contenant des fonctions spécifiques au type pour ce bloc.
opt_id chaîne (Facultatif) Identifiant facultatif. Utilisez cet ID s'il est fourni. Sinon, créez-en un autre.

Renvoie :

BlockSvg

Bloc créé.