FrontEnd.ro logo
Deci FrontEnd-ul e doar butoane?
// Main App
navigator
  .serviceWorker
  .register("service-worker.js")
  .then((swRegistration) => {
    console.log("Service Worker successfully registered!");
  }, (err) => {
    console.error("Service Worker registration failed", err);
  });
// service-worker.js

self.addEventListener('install', (event) => {
  console.log("Successfully installed myself", event);
});