blockly >屏蔽 >getSurroundParent

Block.getSurroundParent() 方法

返回围绕当前块的父块,如果此块没有周围的块,则返回 null。父块可能只是前一个语句,而周围的块是 if 语句、while 循环等。

Signature:

getSurroundParent(): this | null;

返回

本次 |null

围绕当前块的块(如果有)。