setContent method

DOMNode setContent(
  1. Object? newContent
)

Sets the content of this node.

Implementation

DOMNode setContent(Object? newContent) {
  var nodes = DOMNode.parseNodes(newContent);
  if (nodes.isNotEmpty) {
    _content = nodes;
    _setChildrenParent();
    normalizeContent();
  } else {
    _content = null;
  }
  return this;
}