Skip to main content

Home > blockly > Block > setPreviousStatement

Block.setPreviousStatement() method

Set whether this block can chain onto the bottom of another block.

Signature:

setPreviousStatement(newBoolean: boolean, opt_check?: string | string[] | null): void;

Parameters

ParameterTypeDescription
newBooleanbooleanTrue if there can be a previous statement.
opt_checkstring | string[] | null(Optional) Statement type or list of statement types. Null/undefined if any type could be connected.

Returns:

void