ObsoleteThis feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
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.');
};
Browser compatibility
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.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 64 |
Edge
Full support ≤79 |
Firefox No support 49 — 76 No support 49 — 76 Disabled' From version 49 until version 76 (exclusive): this feature is behind the |
IE
? |
Opera
No support No |
Safari
? |
WebView Android
No support No |
Chrome Android
Full support 57 |
Firefox Android Full support 49 Full support 49 Disabled' From version 49: this feature is behind the |
Opera Android
No support No |
Safari iOS
? |
Samsung Internet Android
Full support 7.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Non-standard. Expect poor cross-browser support.'
- Non-standard. Expect poor cross-browser support.
- Deprecated. Not for use in new websites.'
- Deprecated. Not for use in new websites.
- User must explicitly enable this feature.'
- User must explicitly enable this feature.
See also
Window.onappinstalled by Mozilla Contributors is licensed under CC-BY-SA 2.5.