Click or drag to resize

OnBeforePopupCreatedDelegate Delegate

Version 118.6.80
Called beforethe popup is created, can be used to cancel popup creation if required or modify IBrowserSettings. It's important to note that the methods of this interface are called on a CEF UI thread, which by default is not the same as your application UI thread.

Namespace:  CefSharp.WinForms.Handler
Assembly:  CefSharp.WinForms (in CefSharp.WinForms.dll) Version: 118.6.80.0 (118.6.80.0)
Syntax
public delegate PopupCreation OnBeforePopupCreatedDelegate(
	IWebBrowser chromiumWebBrowser,
	IBrowser browser,
	IFrame frame,
	string targetUrl,
	string targetFrameName,
	WindowOpenDisposition targetDisposition,
	bool userGesture,
	IBrowserSettings browserSettings
)

Parameters

chromiumWebBrowser
Type: CefSharp.IWebBrowser
the ChromiumWebBrowser control
browser
Type: CefSharp.IBrowser
The browser instance that launched this popup.
frame
Type: CefSharp.IFrame
The HTML frame that launched this popup.
targetUrl
Type: System.String
The URL of the popup content. (This may be empty/null)
targetFrameName
Type: System.String
The name of the popup. (This may be empty/null)
targetDisposition
Type: CefSharp.WindowOpenDisposition
The value indicates where the user intended to open the popup (e.g. current tab, new tab, etc)
userGesture
Type: System.Boolean
The value will be true if the popup was opened via explicit user gesture (e.g. clicking a link) or false if the popup opened automatically (e.g. via the DomContentLoaded event).
browserSettings
Type: CefSharp.IBrowserSettings
browser settings, defaults to source browsers

Return Value

Type: PopupCreation
To cancel creation of the popup return true otherwise return false.
See Also