Web APIs
Service worker install event
Fires for installation; extend its lifetime to complete installation work.
Formal Syntax & Structure
javascript syntaxjavascript
self.addEventListener("install", listener)Working Example
Example Snippetjavascript
(async () => {self.addEventListener("install",event=>{event.waitUntil(caches.open("bm-v14-install-demo").then(()=>console.log("prepared")));});})()