Click or drag to resize

RequestContextHasPreference Method

Version 71.0.0
Returns true if a preference with the specified name exists. This method must be called on the CEF UI thread.
Returns true if a preference with the specified name exists. This method must be called on the CEF UI thread.

Namespace:  CefSharp
Assembly:  CefSharp.Core (in CefSharp.Core.dll) Version: 71.0.0.0
Syntax
public virtual bool HasPreference(
	string name
)

Parameters

name
Type: SystemString
name of preferencename of preference

Return Value

Type: Boolean
bool if the preference exists

Return Value

Type: Boolean
bool if the preference exists

Implements

IRequestContextHasPreference(String)
Remarks
Use Cef.UIThreadTaskFactory to execute this method if required, Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both executed on the CEF UI thread, so can be called directly. When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main application thread will be the CEF UI thread.
Remarks
Use Cef.UIThreadTaskFactory to execute this method if required, Cef.OnContextInitialized and ChromiumWebBrowser.IsBrowserInitializedChanged are both executed on the CEF UI thread, so can be called directly. When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main application thread will be the CEF UI thread.
See Also