Skip to content

Instantly share code, notes, and snippets.

@illucent
Forked from gauntface/serviceworker.js
Created March 8, 2017 23:21
Show Gist options
  • Save illucent/8f7ca496283d4f0f14fb72774b3fa075 to your computer and use it in GitHub Desktop.
Save illucent/8f7ca496283d4f0f14fb72774b3fa075 to your computer and use it in GitHub Desktop.
Notification Badge Demo
self.addEventListener('push', function(event) {
event.waitUntil(
self.registration.showNotification(
'Hello', {
body: 'Thanks for sending this push msg.',
icon: './images/icon-192x192.png',
badge: './images/icon-72x72.png'
})
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment