开发者

Detecting ALL open pages in Google Chrome, not just those in the current window

I'm looking for a method similar to:

chrome.tabs.getAllInWindow(integer windowId, function callback)

that can get all tabs/pages that are open by the web-browser, whether or not they are in the currently opened window.

I've f开发者_JS百科ound:

chrome.windows.getAll(object getInfo, function callback)

but this by itself does not do what I want.

Can the two be combined somehow to get all the pages currently open in the web browser? Or is there a better way to do this?

Thanks.


If you pass populate flag to getAll it will return not only all windows but tabs in those windows as well:

chrome.windows.getAll({populate: true}, function(windows) {
    //each window will contain an array of tabs in it
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜