This example demonstrates intercepting the beforeinstallprompt event.
beforeinstallprompt
To try it out, click Add to homescreen from the Chrome DevTools Application panel.