Create one accessible approval prompt and grant-management view. All decisions, persistence, deduplication, and rate limits remain in the runtime.
Host DOM mount, trusted label, live runtime, and observers.
Prompt and management actions backed only by RuntimePermissions.
const ui = createBrowserApprovalUi({ mount: document.getElementById('permissions')!, labelForPrincipal: () => 'Verified napplet', getPermissions: () => bridge?.runtime.permissions,});const permissions = { prompt: ui.prompt, onStorageError: ui.reportStorageError }; Copy
const ui = createBrowserApprovalUi({ mount: document.getElementById('permissions')!, labelForPrincipal: () => 'Verified napplet', getPermissions: () => bridge?.runtime.permissions,});const permissions = { prompt: ui.prompt, onStorageError: ui.reportStorageError };
Create one accessible approval prompt and grant-management view. All decisions, persistence, deduplication, and rate limits remain in the runtime.