Skip to content

Instantly share code, notes, and snippets.

@gauntface
Last active March 8, 2017 23:21
Show Gist options
  • Save gauntface/46efe5e67989a067d1e16e630c730f97 to your computer and use it in GitHub Desktop.
Save gauntface/46efe5e67989a067d1e16e630c730f97 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