This commit is contained in:
tamaina
2021-02-17 02:20:45 +09:00
parent 2dc4f24f18
commit c0e9cc1902
6 changed files with 97 additions and 53 deletions

View File

@@ -38,6 +38,14 @@ self.addEventListener('fetch', ev => {
//#region When: Caught Notification
self.addEventListener('push', ev => {
setTimeout(async () => {
console.log('to');
for (const n of await self.registration.getNotifications({ tag: 'user_visible_auto_notification' })) {
console.log(close)
n.close();
}
}, 5000);
// クライアント取得
ev.waitUntil(self.clients.matchAll({
includeUncontrolled: true,