HybridWebView (.NET 11): document AOT-safe invocation - #3409
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 90c9028: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
Pull request overview
Updates the HybridWebView documentation to reflect .NET 11’s AOT/full-trimming-friendly JavaScript-to-.NET invocation path (via source-generated System.Text.Json metadata), while keeping legacy guidance scoped to .NET 10 and earlier.
Changes:
- Monikered HybridWebView trimming/AOT availability notes so .NET 10 and earlier retain the feature-switch guidance, and .NET 11+ points to the
JsonSerializerContextoverload. - Added .NET 11+ guidance/examples for
SetInvokeJavaScriptTarget(..., JsonSerializerContext)including complex parameter/return types. - Monikered legacy trimming incompatibility and
MauiHybridWebViewSupportedfeature switch to apply only to .NET 10 and earlier.
Show a summary per file
| File | Description |
|---|---|
| docs/user-interface/controls/hybridwebview.md | Adds .NET 11+ AOT-safe invocation guidance and monikers legacy trimming notes to <= .NET 10. |
| docs/deployment/includes/trimming-incompatibilities.md | Scopes HybridWebView as trim-incompatible to <= .NET 10 only. |
| docs/deployment/includes/feature-switches.md | Scopes MauiHybridWebViewSupported (and its AppContext switch) to <= .NET 10 only. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 1
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Learn Build status updates of commit 9336b2d: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
Summary
SetInvokeJavaScriptTargetwith aJsonSerializerContext, including complex JavaScript-to-C# parameter/return types.MauiHybridWebViewSupportedfeature switch so they only apply to .NET 10 and earlier.Source verification
SetInvokeJavaScriptTarget<T>(T target, JsonSerializerContext jsonSerializerContext)overload, the legacy overload trim/AOT annotations, source generator interception, and removal ofRuntimeFeature.IsHybridWebViewSupported.Validation
npx --no-install markdownlint-cli2 docs/user-interface/controls/hybridwebview.md docs/deployment/includes/trimming-incompatibilities.md docs/deployment/includes/feature-switches.mdgit diff --checkInternal previews