Compartilhar via


CoreWebView2Profile.SetOriginFeatures Method

Definition

Sets the feature configurations for specified origins. This method allows configuring features such as enhanced security mode for one or more origin patterns. Calling this method multiple times with the same (feature, state) pair overwrites the previous origin list; the most recent call takes precedence. Pass an empty origins collection with the same feature settings to reset those settings to their defaults.

public void SetOriginFeatures(System.Collections.Generic.IEnumerable<string> origins, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<Microsoft.Web.WebView2.Core.CoreWebView2OriginFeature,Microsoft.Web.WebView2.Core.CoreWebView2OriginFeatureState>> features);
member this.SetOriginFeatures : seq<string> * seq<System.Collections.Generic.KeyValuePair<Microsoft.Web.WebView2.Core.CoreWebView2OriginFeature, Microsoft.Web.WebView2.Core.CoreWebView2OriginFeatureState>> -> unit
Public Sub SetOriginFeatures (origins As IEnumerable(Of String), features As IEnumerable(Of KeyValuePair(Of CoreWebView2OriginFeature, CoreWebView2OriginFeatureState)))

Parameters

origins
IEnumerable<String>

The origin patterns to configure. A null value is treated as an empty collection.

features
IEnumerable<KeyValuePair<CoreWebView2OriginFeature,CoreWebView2OriginFeatureState>>

The feature/state pairs to apply. A null value is treated as an empty collection.

Applies to