addEventListener("install", (event) => {
const preCache = async () => {
const cache = await caches.open("static-v1");
return cache.addAll(["/", "/about/", "/static/styles.css"]);
};
event.waitUntil(preCache());
});ExtendableEvent: waitUntil() method / notebook
ExtendableEvent: waitUntil() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.