調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >[ブロック] >廃棄
Block.dispose() メソッド
このブロックを破棄します。
署名:
dispose(healStack?: boolean): void;
パラメータ
パラメータ |
型 |
説明 |
healStack |
ブール値 |
(省略可)true の場合、次の文と前の文を結び付けて、ギャップの解消を試みます。それ以外の場合は、このブロックの子をすべて破棄します。 |
戻り値:
void
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-25 UTC。"],[[["The `dispose()` method permanently removes a block from the workspace."],["It optionally takes a boolean argument, `healStack`, to determine whether to connect the surrounding blocks or dispose of all the block's children."],["By default, `healStack` is false, resulting in the removal of the block and all its nested components."],["When `healStack` is true, it attempts to maintain workspace continuity by connecting the preceding and succeeding blocks."]]],["The `Block.dispose()` method removes a block. It accepts an optional boolean parameter, `healStack`. If `healStack` is true, the method attempts to connect the next statement to the previous one, filling any gaps. If `healStack` is false or omitted, all child blocks of the disposed block are also removed. The method does not return any value.\n"]]