WebBrowser and javascript window.close()

后端 未结 5 1914
挽巷
挽巷 2020-12-19 02:31

If I host a WebBrowser in my application, and a javascript code in the web page shown on my WebBrowser calls window.close() and I click \"Yes\" on

5条回答
  •  独厮守ぢ
    2020-12-19 02:52

    There is an interface DWebBrowserEvents2 which has a method WindowClosing which you can use to cancel the window.close() call.

    (I found the suggestion in this posting)

提交回复
热议问题