Define ServiceWorkerRegistration and make corresponding changes