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.isEmpty) {
    _content = null;
  } else {
    _content = nodes;
    _setChildrenParent();
    normalizeContent();
  }
  return this;
}