title: Popup handler in Cefsharp
body: <p>I tried to handle the popup in Cefsharp(version 43, for Winforms), because I need to execute some javascript in the popup and to navigate to other site, but the application start to freezing when the popup appear. Also, I read the answer from this question <a href="https://stackoverflow.com/questions/30553577/how-to-handle-popup-links-in-cefsharp">How to handle popup links in CefSharp</a> and I tried to implement it and my code look like this.</p>
  
  <pre><code> public class LifeSpanHandler : ILifeSpanHandler
  {
      public event Action&lt;string&gt; PopupRequest;
      //The other members of this interface I leave empty
      public bool OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IWindowInfo windowInfo, ref bool noJavascriptAccess, out IWebBrowser newBrowser)
      {
          if (PopupRequest != null)
              PopupRequest(targetUrl);
          newBrowser = browserControl; // here I think is a problem
          return true;
      }
  }
  
   // Here is Form1 class
      private void Button1_Click(object sender, EventArgs e)
      {
          LifeSpanHandler life = new LifeSpanHandler();
          chromiumWebBrowser1.LifeSpanHandler = life;
          life.PopupRequest += life_PopupRequest;     
         chromiumWebBrowser1.Load("http://www.popuptest.com/goodpopups.html");
      }
  
      void life_PopupRequest(object sender, string e)
      {
          Popup pop = new Popup();
          ChromiumWebBrowser popBrowser = new ChromiumWebBrowser(e);
          pop.Controls.Add(popBrowser);
          pop.Visible = true;
          popBrowser.Dock = DockStyle.Fill;
          popBrowser.Visible = true;
          // here the Application is freezing
      }`
  </code></pre>
  
  <p>So how can I control the popups (to execute some javascript and navigate to other site) ?</p>