Hi,
It will hang for sure with your code. The key step that you missed is you MUST display the new WebView passed to you through the event argument. When a new window is needed, the following sequence of events occurs:
1. The browser engine creates a new WebView object;
2. It passes this WebView to you through NewWindow event;
3. You display e.WebView somehow. For example, the following code display the new WebView in a new form:
Code: C#
//Create a new form and a new WebControl
Form form = new Form();
EO.WebBrowser.WebControl webControl = new EO.WebBrowser.WebControl();
webControl.Dock = DockStyle.Fill;
form.Controls.Add(webControl);
//!!important!! Place the new WebView passed to you
//into the WebControl.
webControl.WebView = e.WebView;
//You must also display the form. This triggers the
//initialization of the WebView. An invisible WebView
//will not be initialization
form.Show();
4. Set e.Accepted to true to indicate that you did accept and display e.WebView;
5. The browser engine waits for the new WebView to initialize;
6. The browser engine loads the target into the new WebView;
If you skip both step 3 and step 4, then the browser engine will skip step 5 and 6 (because you didn't set e.Accepted to true) and the new window will not be displayed, this works effectively as a popup blocker.
If you skip step 3 only (which is your case), then the browser engine will think you have already made all the necessary arrangement to display e.WebView. So it will wait on step 5. However since you didn't do anything with e.WebView, this new WebView will never get a chance to initialize. Thus you will be deadlocked on step 5.
Hope this clears it up for you. Please feel free to let us know if you still have any questions.
Thanks!