Home > blockly > blockRendering > ConstantProvider > createDom
blockRendering.ConstantProvider.createDom() method
Create any DOM elements that this renderer needs (filters, patterns, etc).
Signature:
createDom(svg: SVGElement, tagName: string, selector: string, injectionDivIfIsParent?: HTMLElement): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| svg | SVGElement | The root of the workspace's SVG. |
| tagName | string | The name to use for the CSS style tag. |
| selector | string | The CSS selector to use. |
| injectionDivIfIsParent | HTMLElement | (Optional) The div containing the parent workspace and all related workspaces and block containers, if this renderer is for the parent workspace. CSS variables representing SVG patterns will be scoped to this container. Child workspaces should not override the CSS variables created by the parent and thus do not need access to the injection div. |
Returns:
void