封鎖 >封鎖 >getSurroundParent

Block.getSurroundParent() 方法

傳回位於目前區塊周圍的父項區塊,如果這個區塊沒有周圍區塊,則傳回空值。父項區塊可能只是前一個陳述式,而周圍區塊則是 if 陳述式、而迴圈等。

Signature:

getSurroundParent(): this | null;

傳回:

這份 |空值

圍繞目前區塊的區塊 (如有)。