Idioma

CoreWebView2ClusterEnvironmentOptions Class

Definition

The options used to establish or attach to a shared WebView2 cluster environment, identified by a well-known ClusterName that cooperating hosts agree on. Only options that can be shared process-wide are present. The first host to establish a cluster for a given ClusterName pins these options for as long as the cluster's browser process stays alive; once that browser exits the next host may pin a different set.

public class CoreWebView2ClusterEnvironmentOptions
type CoreWebView2ClusterEnvironmentOptions = class
Public Class CoreWebView2ClusterEnvironmentOptions
Inheritance
CoreWebView2ClusterEnvironmentOptions

Remarks

The options used to establish or attach to a shared WebView2 cluster environment, identified by a well-known ClusterName that cooperating hosts agree on. Only options that can be shared process-wide are present.

Constructors

Name Description
CoreWebView2ClusterEnvironmentOptions(List<CoreWebView2CustomSchemeRegistration>)

Initializes a new instance of the CoreWebView2ClusterEnvironmentOptions class. Set the desired properties (in particular ClusterName) before passing the instance to CreateOrJoinClusterEnvironmentAsync(CoreWebView2ClusterEnvironmentOptions).

Properties

Name Description
AdditionalBrowserArguments

Gets or sets additional command-line switches passed to the shared browser process. This value is part of the pinned set and is process-wide. See AdditionalBrowserArguments for the accepted format and the switches that are ignored.

AllowSingleSignOnUsingOSPrimaryAccount

Gets or sets whether single sign on using the OS primary account is allowed for the shared environment. The default is false.

AreBrowserExtensionsEnabled

Gets or sets whether browser extensions are enabled for the shared environment. The default is false.

ChannelSearchKind

Gets or sets the order that release channels are searched for during shared environment creation. Because the browser process is shared, this value is part of the pinned set. The default is MostStable.

ClusterName

Gets or sets the rendezvous name that identifies the cluster. Must be a valid, case-insensitive file-system folder name of at most 64 characters. An invalid value throws an exception with HRESULT E_INVALIDARG. To avoid colliding with another application's cluster, include a name you control, such as your company or product name, or a GUID.

CustomSchemeRegistrations

Gets the custom scheme registrations that are part of the pinned set for the shared environment.

EnableTrackingPrevention

Gets or sets whether tracking prevention is enabled for the shared environment. The default is true.

Language

Gets or sets the default display language for the shared environment, in the format of BCP 47 Language Tags.

PerHostProfileIsolation

Gets or sets whether the effective profile name is namespaced per host application, to prevent accidental cross-app profile use. The default is true. This is anti-misuse, not a security boundary. It does not encrypt or ACL profile data, and any app that knows the ClusterName and profile name can use a shared profile.

ReleaseChannels

Gets or sets the mask of release channels the shared environment creation searches for. Because the browser process is shared, this value is part of the pinned set and selects the channel of the shared browser. The default is a mask of all channels. Passing only None is treated as if ReleaseChannels were not set, so all channels are searched. See CoreWebView2ReleaseChannels.

Applies to