OnBeforePopupCreatedDelegate Delegate |
Version 108.4.130
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: 108.4.130.0 (108.4.130.0)
Syntax public delegate PopupCreation OnBeforePopupCreatedDelegate(
IWebBrowser chromiumWebBrowser,
IBrowser browser,
IFrame frame,
string targetUrl,
string targetFrameName,
WindowOpenDisposition targetDisposition,
bool userGesture,
IBrowserSettings browserSettings
)
public delegate PopupCreation OnBeforePopupCreatedDelegate(
IWebBrowser^ chromiumWebBrowser,
IBrowser^ browser,
IFrame^ frame,
String^ targetUrl,
String^ targetFrameName,
WindowOpenDisposition targetDisposition,
bool userGesture,
IBrowserSettings^ browserSettings
)
Parameters
- chromiumWebBrowser
- Type: CefSharpIWebBrowser
the ChromiumWebBrowser control - browser
- Type: CefSharpIBrowser
The browser instance that launched this popup. - frame
- Type: CefSharpIFrame
The HTML frame that launched this popup. - targetUrl
- Type: SystemString
The URL of the popup content. (This may be empty/null) - targetFrameName
- Type: SystemString
The name of the popup. (This may be empty/null) - targetDisposition
- Type: CefSharpWindowOpenDisposition
The value indicates where the user intended to
open the popup (e.g. current tab, new tab, etc) - userGesture
- Type: SystemBoolean
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: CefSharpIBrowserSettings
browser settings, defaults to source browsers
Return Value
Type:
PopupCreationTo cancel creation of the popup return true otherwise return false.
See Also