2016-08-07 22 views
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 ] 

答えて

0

  1. ...
  2. は、通知リストで、同じ位置に、新しいと古い置き換え。
  3. ...

ユーザーが暗黙のうちに.close()を実行し、通知自体の[×]ボタンをクリックするまで.close()が明示的にコードから呼び出されるか、されるまで、実装は、リスト内の古い通知を保ちます。

関連する問題