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

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.

主站蜘蛛池模板: 安龙县| 延川县| 洪泽县| 清涧县| 阳曲县| 岢岚县| 昆明市| 安陆市| 平南县| 乳山市| 漳州市| 定兴县| 吴堡县| 山东省| 天峻县| 德兴市| 沧州市| 龙胜| 临沂市| 汽车| 榆林市| 太湖县| 清新县| 汾阳市| 崇阳县| 科技| 贵溪市| 嵩明县| 贵南县| 眉山市| 白银市| 天门市| 邓州市| 枣阳市| 洛川县| 民勤县| 榆中县| 怀柔区| 潞城市| 永寿县| 高碑店市|