Stay organized with collections
Save and categorize content based on your preferences.
blockly > Events > CommentCollapse
Signature:
export declare class CommentCollapse extends CommentBase
Extends: CommentBase
Constructors
Properties
Property |
Modifiers |
Type |
Description |
newCollapsed? |
|
boolean | undefined |
(Optional) |
type |
|
EventType |
|
Methods
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 2025-05-16 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 2025-05-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCommentCollapse\u003c/code\u003e class, extending \u003ccode\u003eCommentBase\u003c/code\u003e, handles events related to collapsing or expanding comments in Blockly.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003enewCollapsed\u003c/code\u003e indicating the comment's collapsed state and \u003ccode\u003etype\u003c/code\u003e for event identification.\u003c/p\u003e\n"],["\u003cp\u003eKey methods include \u003ccode\u003erun\u003c/code\u003e for executing the collapse/expand action and \u003ccode\u003etoJson\u003c/code\u003e for encoding the event data.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this class to manage and respond to comment collapse/expand actions within Blockly applications.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [Events](./blockly.events_namespace.md) \\\u003e [CommentCollapse](./blockly.events_namespace.commentcollapse_class.md)\n\nEvents.CommentCollapse class\n----------------------------\n\n**Signature:** \n\n export declare class CommentCollapse extends CommentBase \n\n**Extends:** [CommentBase](./blockly.events_namespace.commentbase_class.md)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|-------------------------------------------------------------------------------------------------------------------------|-----------|----------------------------------------------------------|\n| [(constructor)(comment, newCollapsed)](./blockly.events_namespace.commentcollapse_class._constructor__1_constructor.md) | | Constructs a new instance of the `CommentCollapse` class |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|--------------------------------------------------------------------------------------------|-----------|----------------------|--------------|\n| [newCollapsed?](./blockly.events_namespace.commentcollapse_class.newcollapsed_property.md) | | boolean \\| undefined | *(Optional)* |\n| [type](./blockly.events_namespace.commentcollapse_class.type_property.md) | | EventType | |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|----------------------------------------------------------------------------------|-----------|---------------------------|\n| [run(forward)](./blockly.events_namespace.commentcollapse_class.run_1_method.md) | | Run a collapse event. |\n| [toJson()](./blockly.events_namespace.commentcollapse_class.tojson_1_method.md) | | Encode the event as JSON. |"]]