Sha256: 68fb31efd48d32b87dd5944e452a9ae997d409596aab74a2114bc45816942f16
Contents?: true
Size: 879 Bytes
Versions: 19
Compression:
Stored size: 879 Bytes
Contents
// Add a service worker for processing Web Push notifications: // // self.addEventListener("push", async (event) => { // const { title, options } = await event.data.json() // event.waitUntil(self.registration.showNotification(title, options)) // }) // // self.addEventListener("notificationclick", function(event) { // event.notification.close() // event.waitUntil( // clients.matchAll({ type: "window" }).then((clientList) => { // for (let i = 0; i < clientList.length; i++) { // let client = clientList[i] // let clientPath = (new URL(client.url)).pathname // // if (clientPath == event.notification.data.path && "focus" in client) { // return client.focus() // } // } // // if (clients.openWindow) { // return clients.openWindow(event.notification.data.path) // } // }) // ) // })
Version data entries
19 entries across 19 versions & 3 rubygems