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
-
... ... @@ -12,14 +12,12 @@ 12 12 self.addEventListener("fetch" , (event) => { 13 13 const pathname = new URL(event.request.url).pathname; 14 14 if(pathname === '/bin/get/XWiki/LiveTableResults') { 15 - console.log(event.request) 16 - } 17 - /*event.respondWith( async function() { 15 + event.respondWith( async function() { 18 18 let response = await fetch(event.request); 19 19 let json = await response.json(); 20 20 let rows = json.rows.filter(row => row.doc_viewable === true); 21 - console.log(rows);19 + alert(JSON.stringify(rows)); 22 22 return response; 23 - }) 24 - */21 + }); 22 + } 25 25 });