Hi,
I try to get all tabs in all windows and discovered that operation
like this:
var someVar = false;
chrome.windows.getAll(undefined, function (windows) {
for (var w = 0, window; window = windows[w]; w++) {
console.log(window);
chrome.tabs.getAllInWindow(
window.id, function
(tabs) {
for (var i = 0, tab; tab = tabs[i]; i++) {
// console.log("tab.url", tab.url);
if (tab.url && isOkUrl(tab.url)) {
someVar = true;
...
}});
if (someVar) { // someVar == false
is executing asynchronously
Is there any callback, which is executed after all windows and tabs
check?