removeChildren method

void removeChildren()

Implementation

void removeChildren() {
  if (firstChild == null) {
    return;
  }

  Node? child = firstChild;
  while (child != null) {
    removeBetween(null, child.nextSibling, child);
    notifyNodeRemoved(child);
  }

  ContainerNode thisNode = this;
  thisNode.ensureNodeData().ensureChildNodeList(thisNode).invalidateCache();
}