Skip to content

Commit

Permalink
Log the notification reply if one exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Anita Woodruff committed Jun 1, 2018
1 parent a0e1ca5 commit 1512649
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/cases/notification-generator-sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ self.addEventListener('activate', function(event) {
self.addEventListener('fetch', function(event) {});

self.addEventListener('notificationclick', function(event) {
if (event.reply) {
alert('User replied: "' + event.reply + '"');
}
var notification = event.notification;

if (!notification.data.hasOwnProperty('options'))
Expand Down

0 comments on commit 1512649

Please sign in to comment.