id-member-manifest-update.js (1062B)
1 window.onload = () => { 2 const instruction = document.createElement("div"); 3 instruction.innerHTML = ` 4 <h2> 5 Instructions 6 </h2> 7 <ol> 8 <li>Install <a href="id-member-manifest-update-manual.html ">id-member-manifest-update-manual.html </a> as a PWA</li> 9 <li> 10 Launch the app from OS. The page should be launched to start_url v1. 11 </li> 12 <li> 13 Close the app window. 14 </li> 15 <li> 16 Trigger a manifest update event. 17 <p> 18 This step is specific to each browser implementation. 19 On Chrome, trigger the update by restarting the browser through chrome://restart. 20 </p> 21 </li> 22 <li> 23 Launch the app from OS again, start_url should be updated to v2. 24 </li> 25 </ol> 26 `; 27 28 document.body.appendChild(instruction); 29 }; 30 async function main() { 31 await navigator.serviceWorker.register("id-member-service-worker.js"); 32 await navigator.serviceWorker.ready; 33 } 34 main();