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.
js
addEventListener("appinstalled", (event) => {});
onappinstalled = (event) => {};
Event type
A generic Event
.
Examples
You can use the appinstalled
event in an addEventListener
method:
js
window.addEventListener("appinstalled", () => {
console.log("Thank you for installing our app!");
});
Or use the onappinstalled
event handler property:
js
window.onappinstalled = () => {
console.log("Thank you for installing our app!");
};
Specifications
Specification |
---|
Manifest Incubations # dom-window-onappinstalled |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
appinstalled event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.