setInnerHtml 方法

void setInnerHtml(
  1. String? html,
  2. {NodeValidator? validator,
  3. NodeTreeSanitizer? treeSanitizer}}
)
override

一个用于将内容放置在 content 而不是作为子节点中的覆盖方法。

另请参阅

实现

void setInnerHtml(String? html,
    {NodeValidator? validator, NodeTreeSanitizer? treeSanitizer}) {
  text = null;
  content!.nodes.clear();
  var fragment = createFragment(html,
      validator: validator, treeSanitizer: treeSanitizer);

  content!.append(fragment);
}