emptyByDOMNode method

bool emptyByDOMNode(
  1. DOMNode? domNode
)

Empties domNode children nodes. Also performs on mapped element.

Implementation

bool emptyByDOMNode(DOMNode? domNode) {
  if (domNode == null) return false;

  var nodeRuntime = domNode.runtime;

  domNode.clearNodes();
  nodeRuntime.clear();

  return true;
}