feat(typedserver): Add SPA fallback support to TypedServer
This commit is contained in:
@@ -110,6 +110,13 @@ export class ServiceWorker {
|
||||
done.reject(error);
|
||||
}
|
||||
});
|
||||
|
||||
// Handle wake-up scenario: if already activated, connect immediately
|
||||
// (install/activate events don't fire on wake-up)
|
||||
if (selfArg.registration?.active) {
|
||||
logger.log('info', 'SW woke up (already activated) - connecting to server');
|
||||
this.connectToServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,5 +16,6 @@ export interface ServiceWindow extends Window {
|
||||
location: any;
|
||||
skipWaiting: any;
|
||||
clients: any;
|
||||
registration?: ServiceWorkerRegistration;
|
||||
}
|
||||
declare var self: Window;
|
||||
Reference in New Issue
Block a user