![](/img/trans.png)
[英]JavaScript .map not rendering chrome.topSites in React
[英]Trying to use Chrome API topSites
我目前正在尝试使用 Chrome API topSites 获取最常访问的网站列表。 在我的背景页面中使用下面的代码到目前为止我没有运气,错误代码Cannot read property 'get' of undefined
。 作为参考,我已经在manifest.json
列出了权限下的 API。
background.js
chrome.topSites.get((arr) => {
console.log(arr);
});
找到了我的问题的解决方案,我没有更新扩展包以使用 chrome API topSites。 我不得不按下load unpacked
和更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.