()
| 20 | var notification; |
| 21 | |
| 22 | function displayNotification() { |
| 23 | if (!notification) { |
| 24 | notification = new Notification("Text"); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | function displaySwNotification() { |
| 29 | navigator.serviceWorker.controller.postMessage( {type: "show_notification", useBadge: swUseBadge.checked}); |