Tabbed Loop, Google Chrome Extensions API

I am working on a slideshow extension for Google Chrome. I have created code that retrieves the correct URLs and opens them one tab at a time. Now I am looking for a function in the Chrome extension API that will allow me to programmatically switch to tabs, but I can not find it? Is there one, and if not, what are my options?

+5
source share
2 answers

Are you looking for a tab API ? The method update()allows you to select a tab:

chrome.tabs.update(tabId, {selected: true});
+13
source

The value selectedis out of date. Use instead highlighted:

chrome.tabs.update(tabId, {highlighted: true});
+2
source

All Articles