@drupflare/spool - v0.1.0
    Preparing search index...

    Function closeOnPageHide

    • Closes db when the page is hidden. An open IndexedDB connection keeps a page out of the back/forward cache, so the page reopens it on the next use. Returns a function that removes the listener.

      Parameters

      • db: Closable
      • target: Pick<EventTarget, "addEventListener" | "removeEventListener"> = window

      Returns () => void