Templates & screen types
Permission prompt templates
Explain why you need a permission before the browser asks for it.
Show the benefit first. The main button runs your code, and your code then makes the browser request. Both templates also offer a way forward without the permission.
| Template | Intended for | Action IDs |
|---|---|---|
| Notification Prompt | Shows the reminder people will get, so more say yes | enable_notifications, plus a "not now" close button |
| Location Prompt | Explains why location helps and offers an alternative | enable_location, enter_city |
onAction: async ({ actionId }) => {
if (actionId === 'enable_notifications') await Notification.requestPermission();
}