hi all,
i have a problem getting current tab info.

var tabUrl;
var tabTitle;
function getTabInfo() {
        chrome.tabs.getSelected(null, function(tab){
                console.dir(tab);

                tabUrl = tab.url;
                tabTitle = tab.title;
        });
}
function createLink() {
        console.log(tabUrl + '|' + tabTitle);
}
getTabInfo();
createLink();

what's wrong with this code?
the tab object is output after createLink() is called...
should i have to set up some communication system between components?
thanks.

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to chromium-extensi...@googlegroups.com.
To unsubscribe from this group, send email to 
chromium-extensions+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=.


Reply via email to