i using code:
url = "unknown"; chrome.tabs.query({'active': true, 'lastfocusedwindow': true}, function(tabs) { console.log(tabs); //test, prints one-element array expected url = tabs[0].url; }); $("#url_div").html(url); to current url, chrome.tabs.query() ansynchronous, how can make synchronous? (i.e. add asynch: false somewhere)
i know set url inside query, or call function there, best (example simplifed) if wasnt asynch.
unless there hidden functionality in query function not possible. http://developer.chrome.com/extensions/tabs.html#method-query
Comments
Post a Comment