Enable installing app as pwa
This commit is contained in:
14
app/views/service_worker/service_worker.js
Normal file
14
app/views/service_worker/service_worker.js
Normal file
@@ -0,0 +1,14 @@
|
||||
function onInstall(event) {
|
||||
console.log("[Serviceworker]", "Installing!", event);
|
||||
}
|
||||
|
||||
function onActivate(event) {
|
||||
console.log("[Serviceworker]", "Activating!", event);
|
||||
}
|
||||
|
||||
function onFetch(event) {
|
||||
console.log("[Serviceworker]", "Fetching!", event);
|
||||
}
|
||||
self.addEventListener("install", onInstall);
|
||||
self.addEventListener("activate", onActivate);
|
||||
self.addEventListener("fetch", onFetch);
|
||||
Reference in New Issue
Block a user