docs: function isDetached(container, target) {
      const docElement = document.documentElement;
  
      return (
          container !== docElement && !docElement.contains(container) ||
          !container.contains(target)
      );
  }