Here is the document https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_onfocus.htm
The method is supposed to add a listener to call when the browser focus changes. However, it never gets call when I switch between tabs in the console.
Here is my js code
var callback = function (response) {
if (response.result) {
alert(response.result);
}};
sforce.interaction.onFocus(callback);