【发布时间】:2016-08-07 13:48:51
【问题描述】:
当从服务工作者调用self.registration.getNotifications({ tag: tag }) 时,返回的数组总是包含已被替换的旧通知。例如:
showNotification('A', { tag: 'abc' }) // Displays the first notification
getNotifications({ tag: 'abc' }) // Returns [ NotificationA ]
showNotification('B', { tag: 'abc' }) // Replaces the previous notification
getNotifications({ tag: 'abc' }) // Returns [ NotificationB, NotificationA ]
showNotification('C', { tag: 'abc' }) // Replaces the previous notification
getNotifications({ tag: 'abc' }) // Returns [ NotificationC, NotificationB, NotificationA ]
【问题讨论】:
标签: google-chrome push-notification notifications web-push