0
サービスワーカーからself.registration.getNotifications({ tag: tag })
を呼び出すと、返された配列には常に古い通知が置き換えられます。例:通知APIの仕様はsteps for replacing a notificationについて明確にしているにもかかわらず通知リストから永続通知を削除する(通知API)
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 ]