- Progressive Web Application Development by Example
- Chris Love
- 67字
- 2021-08-05 10:33:21
Disabling the homescreen prompt
The beforeinstallprompt event can also be used to suppress Chrome's automatic prompt. This time, like breaking the default form submission, call the preventDefault function and return false:
window.addEventListener('beforeinstallprompt', function(e) { e.preventDefault(); return false; });
This will block the behavior in Chrome. Right now, I don't know how to suppress the prompt on other platforms as they do not support the beforeinstallprompt event yet.
推薦閱讀
- GPS/GNSS原理與應用(第3版)
- Windows Server 2003 Active Directory Design and Implementation: Creating, Migrating, and Merging Networks
- 面向云平臺的物聯網多源異構信息融合方法
- 通信簡史:從信鴿到6G+
- NB-IoT物聯網技術解析與案例詳解
- 網絡利他行為研究:積極心理學的視角
- Microsoft Power Platform Enterprise Architecture
- 轉化:提升網站流量和轉化率的技巧
- 沖擊:5G如何改變世界
- 人際網絡
- 通信系統實戰筆記:無處不在的信號處理
- 互聯網視覺設計(全彩慕課版)
- 企業網絡組建與維護項目式教程
- OpenShift Cookbook
- Advanced Node.js Development