예제 #1
0
 public void OnNewWindow(NewWindowEventArgs e)
 {
     if (StartNewWindow != null)
     {
         StartNewWindow(this, e);
     }
 }
예제 #2
0
        public bool OnBeforePopup(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName,
                                  WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo,
                                  IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser)
        {
            ExtChromiumBrowser webBrowser = chromiumWebBrowser as ExtChromiumBrowser;
            Action             action     = new Action(() => {
                NewWindowEventArgs e = new NewWindowEventArgs(windowInfo, targetUrl);
                webBrowser.OnNewWindow(e);
            });

            webBrowser.Invoke(action);
            newBrowser = null;
            return(true);
        }