title: WPF WebBrowser control and JavaScript window.open parameters
body: <p>I've got a WPF application and have a window that contains a <code>System.Windows.Controls.WebBrowser</code> control. I've wired up events like <code>DWebBrowserEvents2_NewWindow2EventHandler</code>, <code>DWebBrowserEvents2_ProgressChangeEventHandler</code>,  <code>DWebBrowserEvents2_NavigateComplete2EventHandler</code>, etc.</p>
  
  <p>Opening popup windows using NewWindow2 or NewWindow3 is OK, but I'd really like to be able to respect and implement the underlying window.open() call's features parameter, like the third parameter here:</p>
  
  <pre class="lang-js prettyprint-override"><code>var newWindow = window.open('http://www.foo.com','myWindow', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
  </code></pre>
  
  <p>I've read <a href="https://stackoverflow.com/questions/2737622/javascript-resizing-with-window-open-and-webbrowser-control">this question and answer</a>, and gone on a 2-day all-out search of the web for a simple(ish) implementation, but all I've really found is the <a href="http://code.google.com/p/csexwb2/" rel="nofollow noreferrer">csexwb2 project</a>, which seems like overkill to me. I don't want to totally replace the WebBrowser control with something else. I'd just like to, at a minimum, open popups at the correct size, as specified by the <code>window.open()</code> call.</p>
  
  <p>I simply can't find a simple, decent, complete implementation of <a href="http://msdn.microsoft.com/en-us/library/bb775416%28VS.85%29.aspx" rel="nofollow noreferrer">INewWindowManager::EvaluateNewWindow</a> using a WebBrowser control in C#. Hasn't anybody had to implement this? I'm stumped.</p>