blockly > blockRendering > Renderer > refreshDom

blockRendering.Renderer.refreshDom() 方法

在更改主题后刷新渲染程序。

Signature:

refreshDom(svg: SVGElement, theme: Theme, injectionDivIfIsParent?: HTMLElement): void;

参数

参数 类型 说明
svg SVGElement 工作区 SVG 的根。
主题 主题 工作区主题对象。
injectionDivIfIsParent HTMLElement (可选)包含父级工作区以及所有相关工作区和块容器的 div(如果此渲染程序适用于父级工作区)。表示 SVG 图案的 CSS 变量将限定在此容器中。子工作区不应替换父级创建的 CSS 变量,因此无需访问注入 div。

返回

void