KangoExtensions / kango

Kango framework issue tracker
74 stars 7 forks source link

Always the same window ID #101

Closed pquerner closed 10 years ago

pquerner commented 10 years ago

When I'm iterating through my windows I'll always the the same window ID. How could that be?

The code:

kango.browser.windows.getAll(function (windows) {
        // wins is Array of KangoBrowserWindows
        for (var i = 0; i < windows.length; i++) {
            var windowId = windows[i].getId();
            windows[i].getTabs(function (tabs) {
//                kango.console.log("-------------------------------------");
                kango.console.log("WinID : " + windowId);
                kango.console.log("Tabs : ");
                kango.console.log(tabs);
                kango.console.log("-------------------------------------");
            });

        }
    });

Kango v1.3.9 is being used.

Seems like this is the way to go.

kango.browser.windows.getAll(function (windows) {
        windows.forEach(function (curWindow) {
            kango.console.log(curWindow.getId());
    });