I want to check in how many tabs my application is currently opened using chrome.tabs api whenever onbeforeunload event occurs in application.
So I wanted to know if it is possible to do it using chrome.tabs if yes then how can it be done.
I want to check in how many tabs my application is currently opened using chrome.tabs api whenever onbeforeunload event occurs in application.
So I wanted to know if it is possible to do it using chrome.tabs if yes then how can it be done.
chrome.tabs.query({windowType:'normal'}, function(tabs) {
console.log('Number of open tabs in all normal browser windows:',tabs.length);
});