Don*_*ant 2 tabs google-chrome-extension browser-tab
作为标题,我无法找到这种方法进入Api - > Tabs ......方式和位置?谢谢'
它已在Chrome 16中弃用.正确的方法是使用chrome.tabs.query与active:true和lastFocusedWindow:true.
// Get the current active tab in the lastly focused window
chrome.tabs.query({
active: true,
lastFocusedWindow: true
}, function(tabs) {
// and use that tab to fill in out title and url
var tab = tabs[0];
run({
url: tab.url,
description: tab.title
});
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4389 次 |
| 最近记录: |