MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / currentPermission

Function currentPermission

apps/ui/src/hooks/useWebPush.hooks.ts:17–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 "PushManager" in window;
16
17const currentPermission = (): IWebPushPermission => {
18 if (!isApiSupported()) {
19 return "default";
20 }
21
22 const granted = Notification.permission;
23
24 if (granted === "granted" || granted === "denied") {
25 return granted;
26 }
27
28 return "default";
29};
30
31const normalizePermission = (
32 value: NotificationPermission

Callers

nothing calls this directly

Calls 1

isApiSupportedFunction · 0.85

Tested by

no test coverage detected