File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Source/NETworkManager/ViewModels Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 44using NETworkManager . Settings ;
55using NETworkManager . Utilities ;
66using NETworkManager . Views ;
7- using System ;
87using System . Threading . Tasks ;
98using System . Windows ;
109using System . Windows . Input ;
10+ using System . Windows . Interop ;
1111
1212namespace NETworkManager . ViewModels ;
1313
@@ -118,7 +118,10 @@ private Task DeleteBrowsingData()
118118 // Create a temporary WebView2 instance to clear browsing data
119119 var webView2Environment =
120120 await CoreWebView2Environment . CreateAsync ( null , GlobalStaticConfiguration . WebConsole_Cache ) ;
121- var webView2Controller = await webView2Environment . CreateCoreWebView2ControllerAsync ( IntPtr . Zero ) ;
121+
122+ var windowHwnd = new WindowInteropHelper ( Application . Current . MainWindow ) . Handle ;
123+
124+ var webView2Controller = await webView2Environment . CreateCoreWebView2ControllerAsync ( windowHwnd ) ;
122125
123126 await webView2Controller . CoreWebView2 . Profile . ClearBrowsingDataAsync ( ) ;
124127
You can’t perform that action at this time.
0 commit comments