RequestHandlerOnOpenUrlFromTab Method |
Version 112.3.0
Called on the UI thread before OnBeforeBrowse in certain limited cases where navigating a new or different browser might be
desirable. This includes user-initiated navigation that might open in a special way (e.g. links clicked via middle-click or
ctrl + left-click) and certain types of cross-origin navigation initiated from the renderer process (e.g. navigating the top-
level frame to/from a file URL).
Namespace:
CefSharp.Handler
Assembly:
CefSharp (in CefSharp.dll) Version: 112.3.0.0 (112.3.0.0)
Syntax protected virtual bool OnOpenUrlFromTab(
IWebBrowser chromiumWebBrowser,
IBrowser browser,
IFrame frame,
string targetUrl,
WindowOpenDisposition targetDisposition,
bool userGesture
)
protected:
virtual bool OnOpenUrlFromTab(
IWebBrowser^ chromiumWebBrowser,
IBrowser^ browser,
IFrame^ frame,
String^ targetUrl,
WindowOpenDisposition targetDisposition,
bool userGesture
)
Parameters
- chromiumWebBrowser
- Type: CefSharpIWebBrowser
the ChromiumWebBrowser control. - browser
- Type: CefSharpIBrowser
the browser object. - frame
- Type: CefSharpIFrame
The frame object. - targetUrl
- Type: SystemString
target url. - targetDisposition
- Type: CefSharpWindowOpenDisposition
The value indicates where the user intended to navigate the browser based on standard
Chromium behaviors (e.g. current tab, new tab, etc). - userGesture
- Type: SystemBoolean
The value will be true if the browser navigated via explicit user gesture (e.g. clicking a link) or
false if it navigated automatically (e.g. via the DomContentLoaded event).
Return Value
Type:
Boolean
Return true to cancel the navigation or false to allow the navigation to proceed in the source browser's top-level frame.
See Also