Stay organized with collections
Save and categorize content based on your preferences.
blockly > Block > setMutator
Block.setMutator() method
Give this block a mutator dialog.
Signature:
setMutator(_mutator: MutatorIcon): void;
Parameters
Parameter |
Type |
Description |
_mutator |
MutatorIcon |
A mutator dialog instance or null to remove. |
Returns:
void
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `Block.setMutator()` method allows you to add or remove a mutator dialog to a block."],["It takes a `MutatorIcon` instance as an argument, which represents the mutator dialog, or null to remove any existing mutator."],["Calling this method modifies the block to include the specified mutator, providing a way to customize its behavior or appearance through a user interface."]]],["The `setMutator` method assigns a mutator dialog to a block. It accepts one parameter, `_mutator`, which is a `MutatorIcon` instance or `null`. If a `MutatorIcon` is provided, it sets the block's mutator dialog. If `null` is provided, it removes the mutator dialog from the block. The method's return type is void, indicating it does not return any value.\n"]]