Window: appinstalled event
The appinstalled
event of the Web Manifest API is fired when the browser has successfully installed a page as an application.
This event is not cancelable and does not bubble.
Syntax
Use the event name in methods like addEventListener()
, or set an event handler property.
addEventListener('appinstalled', event => { });
onappinstalled = event => { };
Event type
A generic Event
.
Examples
You can use the appinstalled
event in an addEventListener
method:
window.addEventListener('appinstalled', function() {
console.log('Thank you for installing our app!');
});
Or use the onappinstalled
event handler property:
window.onappinstalled = function() {
console.log('Thank you for installing our app!');
};
Browser compatibility
BCD tables only load in the browser