Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Last active July 10, 2017 19:52
Show Gist options
  • Save yoshuawuyts/ce73134b5b224160b8b352048ea563b4 to your computer and use it in GitHub Desktop.
Save yoshuawuyts/ce73134b5b224160b8b352048ea563b4 to your computer and use it in GitHub Desktop.
onPush(function (event, register) {
var opts = {
body: 'Yay it works.',
data: 'https://developers.google.com/web/',
actions: [
{ action: 'like', title: 'like!' },
{ action: 'reply', title: 'reply!' }
]
}
var notification = register(title, opts)
notification.on('click', function (event, open) {
})
notification.on('close', function (event) {
})
})
@yoshuawuyts
Copy link
Author

app.use(require('choo-push-notifications')('<hex-key>', [opts]))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment