IExtensionHandlerOnBeforeBackgroundBrowser Method |
Version 104.4.240
Called when an extension needs a browser to host a background script specified via the "background" manifest key.
The browser will have no visible window and cannot be displayed. To allow creation of the browser optionally
modify newBrowser and settings and return false. To cancel creation of the browser
(and consequently cancel load of the background script) return true. Successful creation will be indicated by a call to
ILifeSpanHandler.OnAfterCreated, and IBrowserHost.IsBackgroundHost
will return true for the resulting browser. See https://developer.chrome.com/extensions/event_pages for more information
about extension background script usage.
Namespace:
CefSharp
Assembly:
CefSharp (in CefSharp.dll) Version: 104.4.240.0 (104.4.240.0)
Syntax bool OnBeforeBackgroundBrowser(
IExtension extension,
string url,
IBrowserSettings settings
)
bool OnBeforeBackgroundBrowser(
IExtension^ extension,
String^ url,
IBrowserSettings^ settings
)
Parameters
- extension
- Type: CefSharpIExtension
is the extension that is loading the background script - url
- Type: SystemString
is an internally generated reference to an HTML page that will be used to
load the background script via a script src attribute - settings
- Type: CefSharpIBrowserSettings
browser settings
Return Value
Type:
BooleanTo cancel creation of the browser (and consequently cancel load of the background script) return true, otherwise return false.
See Also