过时
This 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.
appinstalled
event of the
Web Manifest API
is fired when the browser has successfully installed a page as an application.
| 冒泡 | No |
|---|---|
| 可取消 | No |
| 接口 |
事件
|
| Event handler |
onappinstalled
|
可以使用
appinstalled
event in an
addEventListener
方法:
window.addEventListener('appinstalled', function() {
console.log('Thank you for installing our app!');
});
或使用
onappinstalled
事件处理程序特性:
window.onappinstalled = function() {
console.log('Thank you for installing our app!');
};
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.
更新 GitHub 上的兼容性数据| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
onappinstalled
弃用
非标
|
Chrome 64 | Edge ≤79 |
Firefox
49 — 76
Disabled
|
IE ? | Opera No | Safari ? | WebView Android No | Chrome Android 57 | Firefox Android 49 | Opera Android No | Safari iOS ? | Samsung Internet Android No |
完整支持
不支持
兼容性未知
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
用户必须明确启用此特征。
Window.onappinstalled