I've got an extended WebBrowser control which handles the NewWindow3 event. Originally I wanted this because it exposes the Url property.
What I want to happen in this NewWindow event is to cancel opening a new IE instance (so I set E.Cancel
= True). Then, I want to create a new form, a new web browser control and navigate to E.Url
This sort of works. Where I'm running into problems, is with some JavaScript. If I navigate to a page that needs to access it's opener (in this case, to write to a text box), it gets a JavaScript error.
My guess here is that this happens because the WebBrowser.Document.Window.Opener
isn't set.
What can I do to make sure this is set? I've tried a couple of things including setting the ppDisp object to my new WebBrowser object but no joy there.
Editing as a pre-empt: I've tried GeckoFX, and that seems to have a bug in it on resending POST data. It's been reported but not acknowledged. I've also tried WebKit.NET which seems good but a little incomplete.