mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: sw: handle events for streamsaver
This commit is contained in:
1 parent
27bf54ed34
commit
e8b6459e01
3 files changed
+6
-8
No files matched your search
@@ -2,8 +2,10 @@
|
||||
/// <reference lib="ES2015" />
|
||||
/// <reference types="@types/serviceworker" />
|
||||
/* global clients */
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
addEventListener('notificationclick', (event) => {
|
||||
/* eslint-disable no-restricted-globals */
|
||||
import 'streamsaver/sw.js';
|
||||
|
||||
self.addEventListener('notificationclick', (event) => {
|
||||
console.log('On notification click: ', event.notification.tag);
|
||||
event.notification.close();
|
||||
if (!event.notification.tag.startsWith('message-')) return;
|
||||
|
||||
Reference in new issue
Block a user