blockly > Block > getSurroundParent
Return the parent block that surrounds the current block, or null if this block has no surrounding block. A parent block might just be the previous statement, whereas the surrounding block is an if statement, while loop, etc.
getSurroundParent(): this | null;
this | null
The block (if any) that surrounds the current block.