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

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.

主站蜘蛛池模板: 赤水市| 沅陵县| 台东县| 呼和浩特市| 西丰县| 花垣县| 巨鹿县| 平远县| 视频| 从江县| 类乌齐县| 蒲江县| 曲周县| 盐亭县| 诸暨市| 渭源县| 枝江市| 扎赉特旗| 吉水县| 屏东市| 东乌珠穆沁旗| 璧山县| 花莲市| 武邑县| 抚宁县| 枣庄市| 仁怀市| 岗巴县| 陕西省| 丹东市| 丹江口市| 民勤县| 洛扎县| 水富县| 武山县| 孝昌县| 睢宁县| 柳林县| 密山市| 南投市| 阳朔县|