Skip to content

Commit d6f4c4d

Browse files
Remove C# code and add note about dotnet, winrt
1 parent 6420cff commit d6f4c4d

1 file changed

Lines changed: 5 additions & 41 deletions

File tree

specs/SensitivityLabel.md

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Sensitivity label support for Webview2
44
# Background
55
Web pages may contain content with sensitive information. Such information can be identified using data loss protection methods. The purpose of this API is to provide sensitivity label information, communicated by web pages through the [Page Interaction Restriction Manager](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PageInteractionRestrictionManager/explainer.md), to the host application. This enables the host application to be informed of the presence of sensitive content.
66

7+
## Note about .NET/WinRT projection
8+
The work to project this API to .NET and WinRT are yet to be completed. Overall
9+
usage of this API is expected to be uncommon. There are no known asks for
10+
this.
11+
712
# Description
813

914
We propose introducing a SensitivityLabelChanged event to the CoreWebView2 object, enabling applications to monitor changes in sensitivity labels within hosted content. This functionality is restricted to domains explicitly included in an allow list configured by the application. The allow list can be set at the profile level, thereby enabling the Page Interaction Restriction Manager for content within specified domains. By default, the allow list is empty, preventing hosted content from transmitting sensitivity label information.
@@ -20,22 +25,6 @@ The core features of this proposal are as follows:
2025

2126
Configure the PageInteractionRestrictionManager allowlist to enable DLP functionality on trusted domains.
2227

23-
```c#
24-
// Configure allowlist for trusted company URLs
25-
var allowlist = new List<string>
26-
{
27-
"https://intranet.company.com/*",
28-
"https://*.company.com/*", // Wildcard for all company subdomains
29-
"https://trusted-partner.com/*",
30-
"https://secure.vendor.net/*"
31-
};
32-
33-
// Set the allowlist on the profile
34-
webView2Control.CoreWebView2.Profile.PageInteractionRestrictionManagerAllowlist = allowlist;
35-
36-
MessageBox.Show($"Allowlist configured with {allowlist.Count} URLs");
37-
```
38-
3928
```cpp
4029
void ConfigureAllowlist()
4130
{
@@ -80,17 +69,6 @@ void ConfigureAllowlist()
8069

8170
## Retrieving Current Allowlist
8271

83-
```c#
84-
// Get current allowlist
85-
var currentAllowlist = webView2Control.CoreWebView2.Profile.PageInteractionRestrictionManagerAllowlist;
86-
87-
Console.WriteLine($"Current allowlist contains {currentAllowlist.Count} entries:");
88-
foreach (var url in currentAllowlist)
89-
{
90-
Console.WriteLine($" • {url}");
91-
}
92-
```
93-
9472
```cpp
9573
void GetCurrentAllowlist()
9674
{
@@ -254,20 +232,6 @@ interface ICoreWebView2StagingProfile3 : IUnknown {
254232
}
255233
```
256234

257-
```c#
258-
namespace Microsoft.Web.WebView2.Core
259-
{
260-
public partial class CoreWebView2Profile
261-
{
262-
/// <summary>
263-
/// Gets or sets the PageInteractionRestrictionManager allowlist.
264-
/// </summary>
265-
/// <value>A collection of URL patterns that are exempt from page interaction restrictions.
266-
/// Pass an empty collection to clear the allowlist.</value>
267-
public IReadOnlyList<string> PageInteractionRestrictionManagerAllowlist { get; set; }
268-
}
269-
}
270-
```
271235
## Sensitivity label change event
272236
```
273237
/// Enum for sensitivity label State.

0 commit comments

Comments
 (0)