blockly > wstrzykiwanie
funkcja inject()
Wstaw edytor Blockly do określonego elementu kontenera (zwykle elementu div).
Podpis:
export declare function inject(container: Element | string, opt_options?: BlocklyOptions): WorkspaceSvg;
Parametry
Parametr |
Typ |
Opis |
kontener |
Element | tekst |
Element zawierający element, jego identyfikator lub selektor arkusza CSS. |
opt_options |
BlocklyOptions |
(Opcjonalnie) Opcjonalny słownik opcji. |
Zwroty:
WorkspaceSvg
Nowo utworzony główny obszar roboczy.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-22 UTC.
[null,null,["Ostatnia aktualizacja: 2024-08-22 UTC."],[[["The `inject()` function embeds a Blockly editor into a designated HTML element, like a `\u003cdiv\u003e`, identified by its ID or a CSS selector."],["It accepts an optional `BlocklyOptions` object for customizing the editor's appearance and behavior."],["Upon successful injection, the function returns a `WorkspaceSvg` object, representing the main workspace of the newly created Blockly editor."]]],[]]