moveUpByDOMNode method

bool moveUpByDOMNode(
  1. DOMNode? domNode
)

Moves domNode up in the parent children list. Also performs on mapped element.

Implementation

bool moveUpByDOMNode(DOMNode? domNode) {
  if (domNode == null || !domNode.hasParent) return false;

  var nodeRuntime = domNode.runtime;

  var ok1 = domNode.moveUp();
  var ok2 = nodeRuntime.moveUp();

  if (ok1 != ok2) return false;

  return ok1 && ok2;
}