blockly > Block > hasDisabledReason
Block.hasDisabledReason() method
Get whether the block is currently disabled for the provided reason.
Signature:
hasDisabledReason(reason: string): boolean;
Parameters
Parameter |
Type |
Description |
reason |
string |
A language-neutral identifier for a reason why the block could be disabled. |
Returns:
boolean
Whether the block is disabled for the provided reason.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `Block.hasDisabledReason()` method checks if a block is disabled for a specific reason."],["It takes a string identifier representing the reason for potential disability as an argument."],["The method returns `true` if the block is disabled for the given reason, otherwise it returns `false`."]]],["The `Block.hasDisabledReason()` method checks if a block is disabled for a specific reason. It accepts a string `reason` as input, which is a unique identifier for why the block might be disabled. The method then returns a boolean value indicating whether the block is currently disabled due to that provided `reason`. The method signature is `hasDisabledReason(reason: string): boolean;`\n"]]