Changes for page LiveTableServiceWorker
Last modified by bougault on 2022/03/22 17:19
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (0 modified, 0 added, 1 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Main.WebHome - Content
-
... ... @@ -1,0 +1,16 @@ 1 +{{velocity}} 2 +$response.setContentType("text/javascript") 3 +self.addEventListener("install" , evt => { 4 + console.log(evt); 5 +}); 6 + 7 +self.addEventListener("activate" , evt => { 8 + console.log(evt); 9 + clients.claim(); 10 +}); 11 + 12 +self.addEventListener("fetch" , evt => { 13 + console.log(evt); 14 +}); 15 + 16 +{{/velocity}}
- XWiki.JavaScriptExtension[0]
-
- Caching policy
-
... ... @@ -1,1 +1,0 @@ 1 -long - Code
-
... ... @@ -1,16 +1,0 @@ 1 -console.log('hello sw'); 2 -self.addEventListener('fetch', function(event) { 3 -/* 4 - event.respondWith( 5 - fetch(event.request).then(function(response) { 6 - if (response.status === 404) { 7 - return fetch("/path/to/404error.gif"); 8 - } 9 - return response; 10 - }).catch(function() { 11 - return new Response("Uh oh, that totally failed!"); 12 - }) 13 - ); 14 -*/ 15 -}); 16 - - Name
-
... ... @@ -1,1 +1,0 @@ 1 -eu.hbp.collaboratory.apps.livetableserviceworker