The onappinstalled attribute of the Window object serves as an event handler for the appinstalled event, which is dispatched once the web application is successfully installed as a progressive web app. The event that is fired is a "simple event" that implements the Event interface.


window.onappinstalled = function(event) { /* ... */ };


window.onappinstalled = function(ev) {
  console.log('The application was installed.');

Browser compatibility

BCD tables only load in the browser

See also