You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/GetEnvironment.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
# Background
2
-
When the WebView2 team was making design changes to the [WebResourceRequested API](https://github.com/MicrosoftEdge/WebView2Feedback/wiki/WebResourceRequested-API-Review-Spec) for .NET, we realized it was not intutive to create the WebView2 Environment. Thus it was not straightforward to use the CreateWebResourceResponse off the WebView2 Environment.
3
-
WebView2 team plans to introduce an easier way to get the Environment variable and CreateWebResourceResponse.
2
+
When the WebView2 team was making design changes to the [WebResourceRequested API](https://github.com/MicrosoftEdge/WebView2Feedback/wiki/WebResourceRequested-API-Review-Spec) for .NET, we realized several caveats. It was not ideal to force all end developers to keep references back to the CoreWebView2Environment from their CoreWebView2 event handlers, and also in the case of WPF, WinForms and WinUI3.0 the UI framework can create the CoreWebView2Environment internally with no easy way for the end developers to obtain a reference to it. Thus providing a reference to the CoreWebView2Environment off of the CoreWebView2 solves both of those problems.
4
3
5
4
# Description
6
-
One can get WebView2 Environment from `Environment`.
5
+
Get the `CoreWebView2Environment` used to create the `CoreWebView2`from that `CoreWebView2`'s `CoreWebView2Environment` property
0 commit comments