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. 

Syntax

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

Example

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

Specifications

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

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge ? Firefox Full support 49
Disabled
Full support 49
Disabled
Disabled 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.
IE ? Opera ? Safari ? WebView Android ? Chrome Android Full support YesEdge Mobile ? Firefox Android Full support 49
Disabled
Full support 49
Disabled
Disabled 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.
Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
User must explicitly enable this feature.
User must explicitly enable this feature.

See also

Document Tags and Contributors

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