I’ve deleted a question of mine because it seemed to be a duplicate question. But actually I think I came up with an answer that districts my question from the other one.
My original question:
I was wondering if there is a straight way to find out the url of a tab that was activated. I’m asking since the object parameter passed to the handler function of chrome.tabs.onActivated.addListener doesn’t contain the url of the activated tab as onUpdated.addListener‘s handler, for example, does.
Here is an optional answer but I was looking for a simpler one.
The answer linked in the question works for the general case of tracking tabs properties.
However, for that particular case of onActivated, since it’s about the currently active tab, you can simply use
chrome.tabs.getSelected:What do you say?