Created
January 29, 2017 13:14
-
-
Save mciastek/6b66c2b7a542d0f1acebbf1b7b35d91a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| self.addEventListener('push', (event) => { | |
| const title = 'New notification'; | |
| const body = 'We have received a push notification.'; | |
| const icon = '/app-icon-192.png'; | |
| const tag = 'push-notification-tag'; | |
| event.waitUntil( | |
| self.registration.showNotification(title, { | |
| body, | |
| icon, | |
| tag | |
| }) | |
| ); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment