I'm having trouble understanding the difference between the two.
onActivated: Fires when the active tab in a window changes. http://developer.chrome.com/extensions/tabs.html#event-onActivated
onHighlighted: Fired when the highlighted or selected tabs in a window changes. http://developer.chrome.com/extensions/tabs.html#event-onHighlighted
In Chrome, the user can 'highlight' more than one tab by holding the Shift or Ctrl keys and clicking on the tabs (the usual rules apply, Shift extends the selection, Ctrl toggles it). When there is more than one tab highlighted, the context menu for the tabs changes so that some actions are in plural (for instance, 'Close tabs' instead of 'Close tab').
In contrast, there is always exactly one active tab per window, which in addition is always highlighted.
The different events refer to these two different concepts.
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