check if node B is node A's posterrity or not
function isPosterityNode(parent, child) {
  if (!isNode$2(parent) || !isNode$2(child)) {
    return false;
  }
  while (child.parentNode) {
    child = child.parentNode;
    if (child === parent) {
      return true;
    }
  }
  return false;
}