Notification permission retest
A separate Home Screen app with its own manifest, scope and service worker, so it has
never been asked for notification permission. Nothing is requested on load. Tap 1 first,
then 2 with screen recording on. Button 2 records the exact start and end time of
Notification.requestPermission(): a resolve in a few ms with no prompt on
screen is the anomaly being checked.
Current state
- Notification.permission
- ?
- registration.pushManager.permissionState({userVisibleOnly:true})
- ?
- window.pushManager.permissionState() (declarative push, if present)
- ?
- Display mode / navigator.standalone
- ?
- Controlling service worker
- ?
- Registrations in this container
- ?
- Last request (start / end / elapsed / result)
- not requested in this session
- State read at
- ?
Steps
Step 3 subscribes the T7 worker to push with the lab's public VAPID key and records the endpoint host only. If permission is still "default", subscribe can itself prompt, so run it after step 2.
Log (oldest first, kept on this device only)
(empty)
Scope note: the main lab worker's scope (/lab/device-tests/) also contains this page. In a fresh Home Screen app its storage is separate, so only this app's worker registers. In Safari, a previously installed lab worker can control the first load; once the T7 worker registers, the more specific scope takes over on the next navigation. The "Controlling service worker" line shows which one controls this page.