I want to be able to focus on a specific tab.
After chrome.tabs.query
I get the id
but how do I set focus on that tab? I don't see this option in the documentation.
You can also use https://developer.chrome.com/extensions/tabs#method-highlight
chrome.tabs.get(tabId, function(tab) {
chrome.tabs.highlight({'tabs': tab.index}, function() {});
});
You should be able to do this with chrome.tabs.update.
var updateProperties = { 'active': true };
chrome.tabs.update(tabId, updateProperties, (tab) => { });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With