auto-claude: subtask-3-3 - Add JSDoc to serviceWorkerRegistration.ts

This commit is contained in:
2026-01-25 11:54:12 +01:00
parent b4f9ac947b
commit cf6b80201c
+13
View File
@@ -1,3 +1,12 @@
/**
* Service Worker Registration Utility
* Handles registration and unregistration of service workers for PWA functionality
*/
/**
* Registers the service worker
* Automatically registers the service worker after the window load event
*/
export function register() {
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
@@ -14,6 +23,10 @@ export function register() {
}
}
/**
* Unregisters the service worker
* Removes the currently registered service worker
*/
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready