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.');


Specification Status Comment
Web App Manifest
The definition of 'Window.onappinstalled' in that specification.
Working Draft Initial specification.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes ?491 ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? Yes ?491 ? ? ?

1. From version 49: this feature is behind the dom.manifest.onappinstall preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

Document Tags and Contributors

Contributors to this page: wbamberg, chrisdavidmills, marcoscaceres, fscholz, teoli
Last updated by: wbamberg,