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,9 +11,10 @@ 11 11 }); 12 12 13 13 self.addEventListener("fetch" , event => { 14 + 14 14 const pathname = new URL(event.request.url).pathname; 16 + console.log(pathname); 15 15 if(pathname === '/bin/get/XWiki/LiveTableResults') { 16 - const res = fetch(event.request).then(res => res.json()).then(json => json["rows"].filter(row => row.doc_viewable === true)); 17 - event.respondWith(res); 18 + event.respondWith(fetch(event.request).then(res => res.json()).then(json => json["rows"].filter(row => row.doc_viewable === true))); 18 18 } 19 19 });