|
@@ -204,6 +204,20 @@ export default defineComponent({
|
|
|
}
|
|
|
});
|
|
|
// console.log('app - onounted - test interval');
|
|
|
+
|
|
|
+ if ('serviceWorker' in navigator) {
|
|
|
+ navigator.serviceWorker.getRegistrations().then(registrations => {
|
|
|
+ for (const registration of registrations) {
|
|
|
+ if (registration.scope.startsWith(`https://${location.host}/`)) {
|
|
|
+ registration.unregister().then(() => {
|
|
|
+ console.log(
|
|
|
+ `Service Worker unregistered for https://${location.host}/`
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
onUnmounted(() => {
|
|
|
window.removeEventListener('message', handleOpen);
|