mazey
    Preparing search index...

    Function isStandalonePWA

    • Detect whether the current page is displayed as a standalone PWA.

      Checks the standard display-mode: standalone media query and the iOS Safari navigator.standalone compatibility signal. This does not prove that the app is installed, trusted, or controlled by a service worker.

      Callers that already own browser references can inject them without changing globals:

      const standalone = isStandalonePWA({
      environment: { window, navigator },
      });

      Parameters

      Returns boolean

      true in detected standalone presentation; otherwise false.

      Browser-preferred and safe to call during SSR. This is a one-time synchronous read and does not install listeners. When environment is supplied, only those objects are inspected.