I have an extension with a sidebar, when the user close the sidebar a method is called. I need to diference when the user close the sidebar than when he closes the browser.
pseudo Code:
if (userClosedBrowser){
//do something
}else if(userClosedSidebar){
//do something else
}