Google chrome Chrome扩展:使用内联安装不会提供成功/失败回调

Google chrome Chrome扩展:使用内联安装不会提供成功/失败回调,google-chrome,google-chrome-extension,Google Chrome,Google Chrome Extension,我可以从我的网页上使用“内联安装方法”安装我的chrome扩展。但我没有收到任何成功/失败的回电。 我的页面在页面的头部有一个扩展的链接,代码如下 chrome.webstore.install('url to my extension', function () { // Success! console.log('success!'); }, function (err) { // Error :( consol

我可以从我的网页上使用“内联安装方法”安装我的chrome扩展。但我没有收到任何成功/失败的回电。 我的页面在页面的头部有一个扩展的链接,代码如下

  chrome.webstore.install('url to my extension', function () {
        //  Success!
        console.log('success!');
    }, function (err) {
        //  Error :(
        console.log('failed!');
    });

chrome.webstore.install
函数接受2个回调参数,即指向函数的2个指针。您不应该自己调用这些函数,而应该传入它们的名称。可能与此重复:@gui47回调函数刚刚被定义,它们不会像您列出的链接那样被调用。