System / 04

Permissions.

Queries navigator.permissions for camera, mic, geolocation, clipboard, sensors, and notifications. Shows current state without triggering prompts.

Notes

Read-only — running this never grants or revokes anything. Safari has limited Permissions API support; many APIs read as 'not-supported' there even when the feature works.

How it works

We call navigator.permissions.query({ name: ... }) for each API in turn. The browser returns a PermissionStatus with a state field. APIs not recognised by the browser throw, which we catch and label 'not-supported'.

This API was originally Chromium-only; Firefox added it in 2017, Safari in 2022 (partial). On Safari you'll see many APIs read 'not-supported' even when the underlying feature works — that's an API gap, not a permission denial.

Frequently asked

What's the difference between 'denied' and 'prompt'?

'Prompt' means the API hasn't been asked yet on this origin — the next request will trigger a permission dialog. 'Denied' means the user already said no, and the browser will refuse silently from now on. 'Granted' means it works without further interruption. 'Not supported' means the API isn't shipped in this browser at all.

Can I trigger the prompt from this page?

No — that would be a dark pattern. We use the read-only navigator.permissions.query() which surfaces the current state without changing it. To actually grant a permission, visit the specific tool page (e.g. /microphone/waveform for the mic) and the page will request it in context.

Why does Safari say 'not supported' for everything?

Safari has been the slowest to ship the Permissions API. It only added partial support in Safari 16, and several permission names (microphone, camera) are still missing. The features themselves work — getUserMedia still prompts correctly — Safari just doesn't expose the query API yet.

How do I reset a permission?

In Chrome: click the lock icon in the address bar → Site settings. In Firefox: same lock icon → site-specific dropdown. In Safari: Safari → Settings → Websites. Reset, refresh, and the prompt will reappear next time the API is used.