官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 东乡县| 苏尼特左旗| 贡觉县| 温州市| 泰州市| 子长县| 慈溪市| 绥德县| 阿鲁科尔沁旗| 温州市| 诸城市| 新营市| 英山县| 固始县| 乌兰县| 贺兰县| 马公市| 盐亭县| 牟定县| 米林县| 类乌齐县| 怀来县| 建宁县| 陆河县| 耿马| 奉化市| 武强县| 平昌县| 珲春市| 深州市| 成安县| 南宫市| 西平县| 西贡区| 尖扎县| 彰武县| 宁晋县| 穆棱市| 新巴尔虎右旗| 英吉沙县| 屏山县|