Stay organized with collections
Save and categorize content based on your preferences.
blockly > Events > CommentCollapse > run
Run a collapse event.
Signature:
run(forward: boolean): void;
Parameters
Parameter |
Type |
Description |
forward |
boolean |
True if run forward, false if run backward (undo). |
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."],[[["\u003cp\u003eThe \u003ccode\u003erun()\u003c/code\u003e method executes a comment collapse or expand action within Blockly.\u003c/p\u003e\n"],["\u003cp\u003eIt takes a boolean parameter \u003ccode\u003eforward\u003c/code\u003e indicating the direction of the action (true for collapse, false for expand).\u003c/p\u003e\n"],["\u003cp\u003eThe method does not return any value and is used to visually update the comment's state in the Blockly workspace.\u003c/p\u003e\n"]]],["The `Events.CommentCollapse.run()` method executes a comment collapse event. It accepts a boolean parameter, `forward`, which determines the direction of the operation. When `forward` is true, the collapse event runs; when false, it reverses or undoes the collapse. The method does not return any value.\n"],null,["[blockly](./blockly.md) \\\u003e [Events](./blockly.events_namespace.md) \\\u003e [CommentCollapse](./blockly.events_namespace.commentcollapse_class.md) \\\u003e [run](./blockly.events_namespace.commentcollapse_class.run_1_method.md)\n\nEvents.CommentCollapse.run() method\n-----------------------------------\n\nRun a collapse event.\n\n**Signature:** \n\n run(forward: boolean): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|---------|----------------------------------------------------|\n| forward | boolean | True if run forward, false if run backward (undo). |\n\n**Returns:**\n\nvoid"]]