OnBeforePopupCreatedDelegate Delegate |
Version 130.1.90
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.HandlerAssembly: CefSharp.WinForms (in CefSharp.WinForms.dll) Version: 129.0.110.0 (129.0.110.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 IWebBrowser
- the ChromiumWebBrowser control
- browser IBrowser
- The browser instance that launched this popup.
- frame IFrame
- The HTML frame that launched this popup.
- targetUrl String
- The URL of the popup content. (This may be empty/null)
- targetFrameName String
- The name of the popup. (This may be empty/null)
- targetDisposition WindowOpenDisposition
- The value indicates where the user intended to
open the popup (e.g. current tab, new tab, etc)
- userGesture 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 IBrowserSettings
- browser settings, defaults to source browsers
Return Value
PopupCreationTo cancel creation of the popup return true otherwise return false.
See Also