コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >イベント >BlockChange >setDisabledReason
Events.BlockChange.setDisabledReason() メソッド
ブロックが無効となった理由、または無効にされなかった理由を示す、言語に依存しない識別子を設定します。これは、要素が「disabled」となっているイベントに対してのみ有効です。デフォルトは「MANUALLY_DISABLED」です。
署名:
setDisabledReason(disabledReason: string): void;
パラメータ
パラメータ |
型 |
説明 |
disabledReason |
文字列 |
ブロックが無効となった理由、または無効にされなかった理由の識別子。 |
戻り値:
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 `setDisabledReason()` method, part of the `BlockChange` event, sets the identifier for why a block's disabled state changed. It accepts a string parameter, `disabledReason`, which specifies the reason. This method is only relevant when the event's element is 'disabled'. The default reason is 'MANUALLY_DISABLED'. The method returns nothing (void). Its purpose is to record the cause of a block's enabled or disabled status.\n"]]