Installing web apps shouldn't require a bunch of JavaScript. The new <install> element gives you a browser-rendered install button with a single line of HTML, even for apps on other sites. Here's how it works and how to try it in Chrome and Edge.
Read the article at https://developer.chrome.com/blog/install-element-ot