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
[1] This feature is behind a feature preference setting. In about:config, set dom.manifest.onappinstall
to true
.