Changes for page LiveTableServiceWorker
Last modified by bougault on 2022/03/22 17:19
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -11,16 +11,14 @@ 11 11 }); 12 12 13 13 self.addEventListener("fetch" , (event) => { 14 - 14 + console.log('fetch event'); 15 15 const pathname = new URL(event.request.url).pathname; 16 - console.log(pathname); 17 17 if(pathname === '/bin/get/XWiki/LiveTableResults') { 18 18 event.respondWith( async function() { 19 19 console.log('event'); 20 - let req = fetch(event.request); 21 - const response = await req(); 19 + let response = await fetch(event.request); 22 22 console.log('xxxx', response); 23 - return response; 21 + return new Promise(response); 24 24 }); 25 25 } 26 26 });