diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-08-31 00:12:23 +0200 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-08-31 00:12:23 +0200 |
commit | 7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f (patch) | |
tree | c9f1364b98b4804ebeba7d41ae0e86d741f43de9 /sw.js | |
parent | sw (diff) | |
download | ttx-app-7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f.tar ttx-app-7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f.tar.gz ttx-app-7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f.tar.bz2 ttx-app-7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f.tar.lz ttx-app-7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f.tar.xz ttx-app-7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f.tar.zst ttx-app-7225230e2dd7f92e8ef4106f35ecfdd0ccaf496f.zip |
Diffstat (limited to 'sw.js')
-rw-r--r-- | sw.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -43,7 +43,7 @@ self.addEventListener("activate", evt => { ); }); -self.addEventListener("fetch", (evt) => { +self.addEventListener("fetch", (event) => { if (event.request.mode === 'navigate' || // tole ni povsod podprto, zato ( (event.request.method === 'GET' || // če je GET event.request.method === 'POST') // ali POST zahteva @@ -53,8 +53,8 @@ self.addEventListener("fetch", (evt) => { return cacches.match(offlineUrl); })); } else { // zahteva je za nek resource (css/js/img), ne za stran - evt.respondWith(caches.match(evt.request).then((cache_res) => { - return cache_res || fetch(evt.request); + event.respondWith(caches.match(event.request).then((cache_res) => { + return cache_res || fetch(event.request); })) } }); |