There was an error while loading. Please reload this page.
1 parent 61f3767 commit b7dc668Copy full SHA for b7dc668
client/index.js
@@ -8,8 +8,16 @@ const client = (() => {
8
};
9
10
const showNotification = () => {
11
+ const options = {
12
+ body: 'This is an important body!',
13
+ actions: [
14
+ {action: 'search', title: 'Try Searching!'},
15
+ {action: 'close', title: 'Forget it!'},
16
+ ]
17
+ };
18
+
19
navigator.serviceWorker.getRegistration()
- .then(registration => registration.showNotification('My First Notification'));
20
+ .then(registration => registration.showNotification('My First Notification', options));
21
22
23
const checkNotificationSupport = () => {
0 commit comments