setInnerHtml 方法
- String? html, {
- NodeValidator? validator,
- 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);
}