I'm trying to trigger an event on browser tab change in JavaScript. MDN advertises a browser.tabs.onActivated()
function, and shows full support in Chrome, but my Chrome console barks when I try to access either browser
or tabs
global variables.
Does anyone know how to trigger an event on change of browser tab? I'm looking for a vanilla solution without external library dependencies.