auto-claude: subtask-3-3 - Add JSDoc to serviceWorkerRegistration.ts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user