Skip to content

Instantly share code, notes, and snippets.

@kypflug

kypflug/sw-11.js Secret

Created December 15, 2017 02:01
Show Gist options
  • Save kypflug/6aa49c671ce351cf6d3b67cdaecda316 to your computer and use it in GitHub Desktop.
Save kypflug/6aa49c671ce351cf6d3b67cdaecda316 to your computer and use it in GitHub Desktop.
self.onpush = function(event) {
event.waitUntil(
registration.showNotification('WEATHER ADVISORY', {
body: event.data ? event.data.text() : 'no payload',
icon: 'icon.png'
})
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment