How can I be notified when a window is closed by window.close (javascript)?
问题 I've been asked to retro-fit a custom web-browser built around the IE 9 control. One of the requirements was that all pop-up windows must be caught and redirected into a new tab. The customer didn't want any floating stand-alone windows to appear. The previous developer implemented the following function to capture these cases and open a new tab instead. public void NewWindow3(ref object ppDisp, ref bool Cancel, uint dwFlags, string bstrUrlContext, string bstrUrl) {