googlesamples / io2015-codelabs

codelabs for Google I/O 2015
https://codelabs.developers.google.com/
Apache License 2.0
516 stars 165 forks source link

Missing a code example for the service worker offline app demo page #108

Open jonasbolin-se opened 7 years ago

jonasbolin-se commented 7 years ago

"Update your fetch event listener to match the code below."

There is no code below ;)

I think the code inserted should be:

`self.addEventListener('activate', event => { event.waitUntil(self.clients.claim()); });

self.addEventListener('fetch', event => { event.respondWith( caches.match(event.request).then(response => { return response || fetch(event.request); }) ); });`

aki-s commented 7 years ago

I have confirmed the two blocks of code mentioned above are not shown in Japanese page. English page is alright anyway.