const addResourcesToCache = async (resources) => { const cache = await caches.open("v1"); await cache.addAll(resources); }; self.addEventListener("install", (event) => { event.waitUntil( addResourcesToCache([ "/", "/index.html", "/style.css", "/app.js", "/image-list.js", "/star-wars-logo.jpg", "/gallery/bountyHunters.jpg", "/gallery/myLittleVader.jpg", "/gallery/snowTroopers.jpg", ]), ); });