'CefSharp browser integration with avaya contact center
I'm trying to integrate a browser with avaya contact center and I'm facing the same problem. When contact center launches my browser. When working in this browser, when creating new tabs, I get a js error and the page does not load. If I launch my browser separately, the same tabs open fine with no errors.
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)
{
try
{
TabPage tabPage = new TabPage();
if (String.IsNullOrEmpty(targetUrl))
targetUrl = "https://google.com";
ChromiumWebBrowser webBrowser = new ChromiumWebBrowser(targetUrl);
tabPage.Controls.Add(webBrowser);
tabPage.Text = "New tab";
this.tabControl.Invoke(new Action(() => this.tabControl.Controls.Add(tabPage)));
}
catch(Exception ex)
{
logger.Error("OnBeforePopUp= " + ex.Message + ex.StackTrace);
}
newBrowser = null;
return true;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
