0

I've tried different methods.. I need to access url outside the function

var url = '';

chrome.tabs.getSelected(1, function(tab){
    url = tab.url;
});

console.log(url);

0 Answers0