Stay organized with collections
Save and categorize content based on your preferences.
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\u003eWidgetDiv\u003c/code\u003e namespace manages the display and interaction of editor widgets within Blockly.\u003c/p\u003e\n"],["\u003cp\u003eIt provides functions to create, show, hide, reposition, and check the visibility of the widget container.\u003c/p\u003e\n"],["\u003cp\u003eWidgets are associated with an "owner" and can be hidden or repositioned based on the owner's state.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eWidgetDiv\u003c/code\u003e ensures the widget container is properly integrated into the page and adapts to window resizing.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [WidgetDiv](./blockly.widgetdiv_namespace.md)\n\nWidgetDiv namespace\n-------------------\n\nFunctions\n---------\n\n| Function | Description |\n|----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| [createDom()](./blockly.widgetdiv_namespace.createdom_1_function.md) | Create the widget div and inject it onto the page. |\n| [getDiv()](./blockly.widgetdiv_namespace.getdiv_1_function.md) | Returns the HTML container for editor widgets. |\n| [hide()](./blockly.widgetdiv_namespace.hide_1_function.md) | Destroy the widget and hide the div. |\n| [hideIfOwner(oldOwner)](./blockly.widgetdiv_namespace.hideifowner_1_function.md) | Destroy the widget and hide the div if it is being used by the specified object. |\n| [hideIfOwnerIsInWorkspace(workspace)](./blockly.widgetdiv_namespace.hideifownerisinworkspace_1_function.md) | Destroy the widget and hide the div if it is being used by an object in the specified workspace, or if it is used by an unknown workspace. |\n| [isVisible()](./blockly.widgetdiv_namespace.isvisible_1_function.md) | Is the container visible? |\n| [repositionForWindowResize()](./blockly.widgetdiv_namespace.repositionforwindowresize_1_function.md) | Reposition the widget div if the owner of it says to. If the owner isn't a field, just give up and hide it. |\n| [show(newOwner, rtl, newDispose, workspace, manageEphemeralFocus)](./blockly.widgetdiv_namespace.show_1_function.md) | Initialize and display the widget div. Close the old one if needed. |"]]