isVisible function ✓ 100.0%

Last updated: 2026-03-05T11:49:57.418Z

Metrics

LOC: 9 Complexity: 4 Params: 1 Coverage: 100.0% (1/1 lines, 0x executed)

Signature

isVisible(el: Element): : boolean

Source Code

function isVisible(el: Element): boolean {
  const style = window.getComputedStyle(el);
  return (
    style.display !== "none" &&
    style.visibility !== "hidden" &&
    style.opacity !== "0" &&
    (el as HTMLElement).offsetParent !== null
  );
}

No outgoing dependencies.

No incoming dependencies.