MDN self-hosted library · e01.org

Window: appinstalled event

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
window.addEventListener("appinstalled", () => {
  console.log("Thank you for installing our app!");
});
js
window.onappinstalled = () => {
  console.log("Thank you for installing our app!");
};