Web platform features explorer

beforeinstallprompt

Limited availability
Tags: api Groups: Progressive web app

The beforeinstallprompt event fires when a Progressive Web App (PWA) is installable, usually on page load in browsers that support installing PWAs. You can use this event to prevent the install prompt from appearing until after the user interacts with an element on the page.

Learning resources on MDN

Browser support