Skip to content
@drupflare/spool v1.0.0 GitHub
    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