【发布时间】:2014-06-06 23:18:55
【问题描述】:
我通过 Chorme Web Store 在 Google Apps Marketplace 中有一个应用程序。
在编辑列表页面上是Inline Install 的选项。
我已按照说明进行操作,但是当我单击链接时,我在控制台中收到错误消息“只能通过用户手势启动未捕获的 Chrome 网上应用店安装。”。
这是一种误导,因为它是由用户手势触发的。
我尝试了各种不同的方法,例如提供 URL 作为 install 方法的第一个参数,并逐步执行了代码。一切看起来都还不错 - 我现在在想这个功能可能与 Google Apps Marketplace 列表不兼容?
为清楚起见,这是我的代码:
链接
<link rel="chrome-webstore-item"
href="https://chrome.google.com/webstore/detail/[listingId]">
Javascript:
document.getElementById('btnTestInline').addEventListener('click', function() {
chrome.webstore.install();
});
HTML:
<button id="btnTestInline">Add to Chrome</button>
【问题讨论】:
标签: google-apps-marketplace chrome-web-store