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

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.

主站蜘蛛池模板: 张家川| 新密市| 石台县| 长垣县| 宁陵县| 遵化市| 佛坪县| 田东县| 偃师市| 南郑县| 如皋市| 右玉县| 治县。| 鄂托克旗| 汽车| 汝阳县| 榆中县| 鸡西市| 平舆县| 乌苏市| 安平县| 万州区| 南皮县| 缙云县| 勐海县| 二连浩特市| 当雄县| 康平县| 绍兴市| 乐昌市| 怀集县| 吴旗县| 长治市| 内乡县| 逊克县| 湘潭市| 延津县| 大安市| 民乐县| 潼关县| 涪陵区|