mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 08:03:22 +00:00
0243876795
- Allow for cancelling of popup creation
browser.LifeSpanHandler = CefSharp.WinForms.Handler.LifeSpanHandler
.Create()
.OnBeforePopupCreated((chromiumWebBrowser, b, frame, targetUrl, targetFrameName, targetDisposition, userGesture, browserSettings) =>
{
//Can cancel opening popup based on Url if required.
if(targetUrl?.StartsWith(CefExample.BaseUrl + "/cancelme.html") == true)
{
return PopupCreation.Cancel;
}
return PopupCreation.Continue;
})