isEquivalentNode method

bool isEquivalentNode(
  1. DOMNode domNode,
  2. T node
)

Implementation

bool isEquivalentNode(DOMNode domNode, T node) {
  if (!isEquivalentNodeType(domNode, node)) {
    return false;
  }

  if (domNode is TextNode) {
    return domNode.text == getNodeText(node);
  }

  throw UnsupportedError(
      "Can't determine node equivalency: $domNode == $node");
}