- 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.
推薦閱讀
- 廣電5G從入門到精通
- 微商之道
- Application Development with Qt Creator(Second Edition)
- Building E-commerce Sites with VirtueMart Cookbook
- 智能網聯汽車V2X與智能網聯設施I2X
- Hands-On Chatbots and Conversational UI Development
- 農產品物聯網研究與應用
- Microsoft Dynamics CRM 2011 Applications(MB2-868) Certification Guide
- 基于性能的保障理論與方法
- 工業互聯網創新實踐
- 物聯網場景設計與開發(初級)
- 無線傳感器網絡定位技術
- 局域網組成實踐
- TCP/IP基礎(第2版)
- 計算機網絡技術