Skip to content

Commit d9fb9b3

Browse files
some minor improvements
1 parent 0b99599 commit d9fb9b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

specs/TrustedOrigin.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This specification introduces the following APIs.
2121

2222
- **GetOriginSettings**: Get the list of `CoreWebView2OriginSetting` for this profile.
2323
- **CreateOriginSetting**: Create and return a new `CoreWebView2OriginSetting` object.
24-
2. `ICoreWebView2OriginSetting`interface, which exposes get and set APIs for the following features. These APIs are used to set the feature state of these features.
24+
2. `ICoreWebView2OriginSetting`interface, which exposes get and set APIs for the following features. These APIs are used to set the state of these features.
2525

2626
- AccentColor
2727
- EnhancedSecurityMode
@@ -71,12 +71,12 @@ void ScenarioTrustedOrigin::SetFeatureForOrigins(std::wstring originPattern)
7171
var profile = webView2.CoreWebView2.Profile;
7272
7373
var originSetting = profile.CreateOriginSetting();
74-
originSetting.AccentColor = Block;
75-
originSetting.PersistenceStorage = Allow;
74+
originSetting.OriginPattern = "https://*.contoso.com";
75+
originSetting.AccentColor = OriginSettingState.Block;
76+
originSetting.PersistenceStorage = OriginSettingState.Allow;
7677
7778
var originSettings = profile.GetOriginSettings();
78-
originSettings.Append(originSettings);
79-
79+
originSettings.Add(originSetting);
8080
```
8181

8282

0 commit comments

Comments
 (0)