封鎖 >CodeGenerator >addLoopTrap
CodeGenerator.addLoopTrap() 方法
在迴圈內容中新增無限迴圈陷阱。在迴圈區塊的開頭 (在迴圈陳述式執行後) 加上陳述式後置字串,並在迴圈陳述式執行前加上陳述式前置字串。
Signature:
addLoopTrap(branch: string, block: Block): string;
參數
參數 |
類型 |
說明 |
分支版本 |
字串 |
迴圈內容的程式碼。 |
封鎖 |
封鎖 |
封閉區塊: |
傳回:
字串
循環內容,並加上無限迴圈陷阱。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-15 (世界標準時間)。
[null,null,["上次更新時間:2024-10-15 (世界標準時間)。"],[[["This method redraws any attached marker or cursor SVGs to the BlockSvg if they require updating."],["It's a protected method within the BlockSvg class, meaning it's primarily for internal use within Blockly's functionality."],["The method doesn't return any specific value (void), simply performing the update action when invoked."]]],[]]