samedi 2 juillet 2016

How can chrome.tabs.query show information of all tabs?

I am new to Chrome extension developing. As far as I know, chrome.tabs.query only works in background.js, and I was trying to use the code below to check out the information returned. However, the result only returns to the background page console, and it only gives me the information of "chrome://extensions/" page.

chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
  console.log("tab ID:");
  console.log(tabs);
});

How can I get the information of all/any of the tabs that is opening in the current window?

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire