blockly > ASTNode > createButtonNode

ASTNode.createButtonNode() method

Create an AST node of type button. A button in this case refers specifically to a button in a flyout.

Signature:

static createButtonNode(button: FlyoutButton): ASTNode | null;

Parameters

Parameter Type Description
button FlyoutButton A top block has no parent and can be found in the list returned by workspace.getTopBlocks().

Returns:

ASTNode | null

An AST node of type stack that points to the top block on the stack.