问题描述
我正在尝试在扩展程序网站上使用inline install。该网站是使用vue制作的,我无法调用chrome.webstore.install()
,但总是收到此错误vue.runtime.esm.js:1888 TypeError: Cannot read property 'install' of undefined
我有两个chrome商店链接,根据文档,我需要将链接传递到将要安装的扩展程序,在我的Vue模板代码中,为此我使用了@click.prevent="installExtension(url)"
和方法
installExtension(url){
chrome.webstore.install(url,this.onsuccess(),this.onerror() )
}
如我所写,我在控制台中收到错误,但看不到任何弹出窗口。 如何在我的网站上提示安装firefox和chrome扩展名?
解决方法
不幸的是,内联安装已链接到恶意行为,已被弃用。
Important: As of 06/12/2018,inline installation is deprecated.
参考:https://developer.chrome.com/webstore/inline_installation
Google博客文章:https://blog.chromium.org/2018/06/improving-extension-transparency-for.html