@jossmac/lil-libs
    Preparing search index...

    Function isHtmlElement

    • Type guard for narrowing unknown values to HTMLElement.

      • value: unknown

        Unknown value to narrow (e.g. from querySelector).

      true when value is an HTMLElement instance; false in non-DOM environments or for other node types.

      const el = document.querySelector("#app");
      if (isHtmlElement(el)) {
      el.tabIndex = -1;
      }