/** Move a modal host element to `document.body` so `position: fixed` covers the viewport. */
export function portalHostElementToBody(host: HTMLElement, body: HTMLElement): boolean {
  if (host.parentElement === body) {
    return false;
  }

  body.appendChild(host);
  return true;
}
