get-popup-container.ts 243 B

123456
  1. /**
  2. * Returns the parent node of the given element or the document body if the element is not provided.it
  3. */
  4. export function getPopupContainer(node?: HTMLElement): HTMLElement {
  5. return (node?.parentNode as HTMLElement) ?? document.body;
  6. }