blockly > WorkspaceSvg > deleteVariableById
WorkspaceSvg.deleteVariableById() method
Delete a variable by the passed in ID. Update the flyout to show immediately that the variable is deleted.
Signature:
deleteVariableById(id: string): void;
Parameters
Parameter |
Type |
Description |
id |
string |
ID of variable to delete. |
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.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `deleteVariableById` method removes a variable from the WorkspaceSvg based on its unique ID."],["This method also updates the flyout to reflect the variable deletion immediately."],["The method accepts a single argument, a string representing the ID of the variable to be deleted, and returns void."]]],[]]