root property

DOMNode get root

Returns the root DOMNode of this element. If this node doesn't have a parent, will return this instance as root.

Implementation

DOMNode get root {
  if (parent == null) {
    return this;
  }
  return parent!.root;
}