Click or drag to resize

IExtensionHandlerOnBeforeBrowser Method

Version 73.1.130
Called when an extension API (e.g. chrome.tabs.create) requests creation of a new browser. Successful creation will be indicated by a call to OnAfterCreated(IWebBrowser, IBrowser).

Namespace:  CefSharp
Assembly:  CefSharp (in CefSharp.dll) Version: 73.1.130.0 (73.1.130.0)
Syntax
bool OnBeforeBrowser(
	IExtension extension,
	IBrowser browser,
	IBrowser activeBrowser,
	int index,
	string url,
	bool active,
	IWindowInfo windowInfo,
	IBrowserSettings settings
)

Parameters

extension
Type: CefSharpIExtension
the source of the API call
browser
Type: CefSharpIBrowser
the source of the API call
activeBrowser
Type: CefSharpIBrowser
may optionally be specified via the windowId property or returned via the GetActiveBrowser() callback and provides the default for the new browser
index
Type: SystemInt32
is the position value optionally specified via the index property
url
Type: SystemString
is the URL that will be loaded in the browser
active
Type: SystemBoolean
is true if the new browser should be active when opened
windowInfo
Type: CefSharpIWindowInfo
optionally modify if you are going to allow creation of the browser
settings
Type: CefSharpIBrowserSettings
optionally modify browser settings

Return Value

Type: Boolean
To cancel creation of the browser return true. To allow creation return false and optionally modify windowInfo and settings
See Also