封鎖 >一般 >setParentContainer
Common.setParentContainer() 函式
設定父項容器。這是容器元素,系統會在首次呼叫 Blockly.inject
時算繪 WidgetDiv、DropDownDiv 和工具提示。如果在第一個 Blockly.inject
之後呼叫,這個方法就會是 NOP。
Signature:
export declare function setParentContainer(newParent: Element): void;
參數
參數 |
類型 |
說明 |
newParent |
元素 |
容器元素。 |
傳回:
void
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-29 (世界標準時間)。
[null,null,["上次更新時間:2024-08-29 (世界標準時間)。"],[[["The `setParentContainer` function designates the container for UI elements like WidgetDiv, DropDownDiv, and Tooltip during the initial Blockly injection."],["It accepts an HTML element as the new parent container for these Blockly UI elements."],["Calling this function after the first `Blockly.inject` has no effect."]]],[]]