protected override bool OnBeforePopup(CefBrowser browser, CefFrame frame, string targetUrl, string targetFrameName, CefWindowOpenDisposition targetDisposition, bool userGesture, CefPopupFeatures popupFeatures, CefWindowInfo windowInfo, ref CefClient client, CefBrowserSettings settings, ref bool noJavascriptAccess) { var e = new BeforePopupEventArgs(frame, targetUrl, targetFrameName, popupFeatures, windowInfo, client, settings, noJavascriptAccess); _core.InvokeIfRequired(() => _core.OnBeforePopup(e)); client = e.Client; noJavascriptAccess = e.NoJavascriptAccess; return(e.Handled); }
protected override bool OnBeforePopup(CefBrowser browser, CefFrame frame, string targetUrl, string targetFrameName, CefPopupFeatures popupFeatures, CefWindowInfo windowInfo, ref CefClient client, CefBrowserSettings settings, ref bool noJavascriptAccess) { var e = new BeforePopupEventArgs(frame, targetUrl, targetFrameName, popupFeatures, windowInfo, client, settings, noJavascriptAccess); _core.InvokeIfRequired(() => _core.OnBeforePopup(e)); client = e.Client; noJavascriptAccess = e.NoJavascriptAccess; //if (FileHelper1.read("//config//chromeconfig.txt")[0] == "true") { e.Handled = true; //} return(e.Handled); // return true;//强制不弹出 }