1self.addEventListener('push', function(event) { 2 let data = event.data.json(); 3 let param = {data: {url: data.url}}; 4 if(data.description) param.body = data.description; 5 if(data.account && data.account.picture) param.icon = data.account.picture; 6 if(data.account && data.account.picture) param.badge = data.account.picture; 7 8 const promiseChain = self.registration.showNotification(data.title, param); 9 event.waitUntil(promiseChain); 10}); 11 12 13self.addEventListener('notificationclick', function(event) { 14 event.notification.close(); 15 const promiseChain = clients.openWindow(event.notification.data.url); 16 event.waitUntil(promiseChain); 17});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.