Glossary

Definition

actions (Notification option)

Short definition

actions is an array option passed to showNotification(), e.g. { actions: [{ action: "reply", title: "Reply" }, { action: "dismiss", title: "Dismiss" }] }, that renders extra buttons on the notification itself. The service worker's notificationclick handler reads event.action to see which button, if any, the user pressed.

Reviewed August 4, 2026

Handling looks like: self.addEventListener("notificationclick", (event) => { event.notification.close(); if (event.action === "reply") { /* open a reply UI */ } else { clients.openWindow("/inbox"); } });.

Actions are only usable from a service-worker-shown notification (self.registration.showNotification()) — the page-level new Notification() constructor does not support the actions option at all, per the spec.

Most platforms cap the number of visible actions at two, so any additional entries in the array are simply not rendered rather than causing an error; design the primary flow around the first two actions.

Each action can also specify its own small icon via an icon field, though rendering of action icons varies significantly by OS and is often omitted in practice for reliability.

Related terms
badge (Notification option)
badge is a field passed to showNotification(title, { badge: "/badge-72.png", ... }) that supplies a small, typically monochrome PNG icon (recommended around 72x72 or 96x96) shown in the Android status bar and shade, as distinct from the larger icon field used for the main notification image.
tag (Notification option)
tag is a string option, e.g. showNotification("New message", { tag: "chat-thread-42" }), used to identify a class of related notifications. When a new notification arrives with a tag matching one already showing, the browser replaces it in place by default rather than adding a second, separate notification to the shade.
Notification permission states
Notification.permission returns one of three strings: "default" (the user has not yet decided, so the site may still call Notification.requestPermission() to ask), "granted" (the site may show notifications), or "denied" (the site is blocked from showing notifications and, critically, cannot re-prompt programmatically once denied).
renotify (Notification option)
renotify is a boolean option, e.g. { tag: "order-42", renotify: true }, that only has an effect when combined with tag. Without renotify, a new notification that replaces an existing same-tag notification updates silently with no new sound or vibration; with renotify: true, the replacement alerts the user exactly as a brand-new notification would.
silent (Notification option)
silent is a boolean Notification option, e.g. showNotification("Synced", { silent: true }), that suppresses the sound, vibration and screen-wake behaviour a notification would normally trigger, while still adding it to the notification shade for the user to see whenever they next check.
requireInteraction (Notification option)
requireInteraction is a boolean option, e.g. showNotification("Incoming call", { requireInteraction: true }), that prevents the browser from automatically dismissing the notification after its default timeout (a few seconds on most desktop platforms). The notification instead stays visible until the user clicks it, clicks an action, or closes it manually.