bbpro
Version:
BrowserBox - remote browser isolation tool
12 lines (9 loc) • 363 B
JavaScript
import {CONFIG} from './voodoo/src/common.js';
if (CONFIG.useServiceWorkerToCache && 'serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js').then(registration => {
console.log('Service Worker registered with scope:', registration.scope);
})
.catch(error => {
console.error('Service Worker registration failed:', error);
});
}