Web Notification API


## schedule local notifications that don't require a network connection

[Notifire](https://texonom.com/notifire-e77ae63599cf4e928e86c948f4dfd4e1)

### create
```typeif ('showTrigger' in Notification.prototype) {  const createScheduledNotification = async (tag, title, timestamp) => {  const registration = await navigator.serviceWorker.getRegistration();  registration.showNotification(title, {    tag: tag,    body: 'This notification was scheduled 30 seconds ago',    showTrigger: new TimestampTrigger(timestamp + 30 * 1000),  });};}```

### cancel
```typeconst cancelScheduledNotification = async (tag) => {  const registration = await navigator.serviceWorker.getRegistration();  const notifications = await registration.getNotifications({    tag: tag,    includeTriggered: true,  });  notifications.forEach((notification) => notification.close());};```

### demo
> [Notification Triggers](https://notification-triggers.glitch.me/)

> [Notification Triggers](https://web.dev/notification-triggers/)





