Skip to content

Conversation

@chetanpandey1266
Copy link
Contributor

@chetanpandey1266 chetanpandey1266 commented Dec 11, 2025

This pull request introduces a new specification for Trusted Origin support in WebView2, enabling applications to apply different security and feature policies based on the trust level of content origins. The changes provide APIs for designating trusted origins and configuring feature access and security settings per origin, addressing previous limitations around uniform policy enforcement.

Trusted Origin API and Feature Management:

  • Added APIs to CoreWebView2Profile for creating, setting, and retrieving feature settings for trusted origins, allowing fine-grained control over security and feature policies.
  • Defined new interfaces and enums (ICoreWebView2StagingProfile3, ICoreWebView2StagingTrustedOriginFeatureSetting, and COREWEBVIEW2_TRUSTED_ORIGIN_FEATURE) to represent origin-specific feature configurations, including AccentColor, PersistentStorage, and EnhancedSecurityMode.

Usage Examples and API Details:

  • Provided C++ and .NET/WinRT code samples demonstrating how to set and get trusted origin feature settings, including support for wildcard origin patterns.
  • Documented API details for both C++ and .NET/WinRT, specifying method signatures and usage for managing trusted origin features.

Background and Motivation:

  • Explained the need for Trusted Origin support, highlighting challenges with uniform security policies and the benefits of selective feature enable

@chetanpandey1266 chetanpandey1266 added the API Proposal Review WebView2 API Proposal for review. label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Proposal Review WebView2 API Proposal for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants