We all know when we close the last tab in chrome , chrome closes as well. As a user, I want a confirmation when it is the last tab open.
Showing a confirmation on close is easy. window.onbeforeunload = function(e) { }
does the job.
BUT HOW DO I KNOW ITS THE LAST TAB OR NOT, OR GET THE COUNT OF TABS OPEN IN CHROME.