Stay organized with collections
Save and categorize content based on your preferences.
blockly > WorkspaceSvg > removeTopComment
Removes a comment from the list of top comments.
Signature:
removeTopComment(comment: RenderedWorkspaceComment): void;
Parameters
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 2025-07-24 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-07-24 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eremoveTopComment\u003c/code\u003e method is part of the \u003ccode\u003eWorkspaceSvg\u003c/code\u003e class in Blockly and is used to manage comments within a workspace.\u003c/p\u003e\n"],["\u003cp\u003eIt takes a \u003ccode\u003eWorkspaceComment\u003c/code\u003e object as an argument and removes it from the workspace's list of top-level comments, effectively deleting the comment visually and from the workspace data.\u003c/p\u003e\n"],["\u003cp\u003eThe method does not return any value and modifies the workspace directly.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [WorkspaceSvg](./blockly.workspacesvg_class.md) \\\u003e [removeTopComment](./blockly.workspacesvg_class.removetopcomment_1_method.md)\n\nWorkspaceSvg.removeTopComment() method\n--------------------------------------\n\nRemoves a comment from the list of top comments.\n\n**Signature:** \n\n removeTopComment(comment: RenderedWorkspaceComment): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|--------------------------------------------------------------------------------------------|--------------------|\n| comment | [RenderedWorkspaceComment](./blockly.comments_namespace.renderedworkspacecomment_class.md) | comment to remove. |\n\n**Returns:**\n\nvoid"]]