[英]chrome.tabs is not present in chrome object
我在background.js文件中添加了此偵聽器,這是一個后台腳本
chrome.tabs.onActivated.addListener( function(info) {
chrome.tabs.get(info.tabId, function(tab) {
chrome.tabs.reload();
});
});
但是在chrome對象中,沒有選項卡。
清單文件是
{
"name": "Tab Logger",
"description": "Logs the clicked tabs with time",
"version": "0.1",
"manifest_version": 2,
"app": {
"background": {
"scripts": ["background.js"]
}
},
"permissions": [
"tabs"
],
"icons": { "16": "calculator-16.png", "128": "calculator-128.png" }
}
有人可以告訴我我在做什么錯嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.