File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
railties/lib/rails/generators/rails/app/templates/app/views/pwa Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 4
4
// const { title, options } = await event.data.json()
5
5
// event.waitUntil(self.registration.showNotification(title, options))
6
6
// })
7
- //
7
+ //
8
8
// self.addEventListener("notificationclick", function(event) {
9
9
// event.notification.close()
10
10
// event.waitUntil(
11
11
// clients.matchAll({ type: "window" }).then((clientList) => {
12
12
// for (let i = 0; i < clientList.length; i++) {
13
13
// let client = clientList[i]
14
14
// let clientPath = (new URL(client.url)).pathname
15
- //
15
+ //
16
16
// if (clientPath == event.notification.data.path && "focus" in client) {
17
17
// return client.focus()
18
18
// }
19
19
// }
20
- //
20
+ //
21
21
// if (clients.openWindow) {
22
22
// return clients.openWindow(event.notification.data.path)
23
23
// }
You can’t perform that action at this time.
0 commit comments