Vue-chrome.webstore.install"Cannot read property 'install' of undefined"

Vue - chrome.webstore.install "Cannot read property 'install' of undefined"

我正在尝试在我的扩展网站上使用 inline install。该网站是使用 vue 制作的,我无法调用 chrome.webstore.install(),我总是收到此错误 vue.runtime.esm.js:1888 TypeError: Cannot read property 'install' of undefined

我有两个 chrome 商店 link,根据文档,我需要将 link 传递给将要安装的扩展,在我的 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 博客 post: https://blog.chromium.org/2018/06/improving-extension-transparency-for.html