How can I detect a browser tab being closed in a managed BHO in IE11?
<p>I've created a browser helper object in C# by deriving from <code>IObjectWithSite</code>.  When <code>SetSite()</code> is called I cache the reference to the site as a <code>SHDocVw.WebBrowser</code>.  From what I've seen, IE versions prior to 11 would call <code>SetSite(null)</code> when the tab was closed, but this is no longer the case.</p>

<p>Is there a way of detecting when a tab is closed from managed code?</p>

<p>Any help much appreciated!</p>