function isHostInclusiveAncestor(nodeImplA, nodeImplB) {
  for (const ancestor of domSymbolTree.ancestorsIterator(nodeImplB)) {
    if (ancestor === nodeImplA) {
      return true;
    }
  }

  const rootImplB = getRoot(nodeImplB);
  if (rootImplB._host) {
    return isHostInclusiveAncestor(nodeImplA, rootImplB._host);
  }

  return false;
}
function isHostInclusiveAncestor(nodeImplA, nodeImplB) {
  for (const ancestor of domSymbolTree.ancestorsIterator(nodeImplB)) {
    if (ancestor === nodeImplA) {
      return true;
    }
  }

  const rootImplB = getRoot(nodeImplB);
  if (rootImplB._host) {
    return isHostInclusiveAncestor(nodeImplA, rootImplB._host);
  }

  return false;
}
function isHostInclusiveAncestor ( nodeImplA , nodeImplB ) { for ( const ancestor of domSymbolTree . ancestorsIterator ( nodeImplB ) ) { if ( ancestor === nodeImplA ) { return true ; } } const rootImplB = getRoot ( nodeImplB ) ; if ( rootImplB . _host ) { return isHostInclusiveAncestor ( nodeImplA , rootImplB . _host ) ; } return false ; }
https://dom.spec.whatwg.org/#concept-tree-host-including-inclusive-ancestor
https : // dom . spec . whatwg . org / #concept - tree - host - including - inclusive - ancestor