@@ -77,16 +77,16 @@ public WebConsoleControl(Guid tabId, WebConsoleSessionInfo sessionInfo)
7777 _tabId = tabId ;
7878 _sessionInfo = sessionInfo ;
7979
80- Browser2 . NavigationStarting += Browser2_NavigationStarting ;
81- Browser2 . NavigationCompleted += Browser2_NavigationCompleted ;
82- Browser2 . SourceChanged += Browser2_SourceChanged ;
80+ Browser . NavigationStarting += Browser2_NavigationStarting ;
81+ Browser . NavigationCompleted += Browser2_NavigationCompleted ;
82+ Browser . SourceChanged += Browser2_SourceChanged ;
8383
8484 Dispatcher . ShutdownStarted += Dispatcher_ShutdownStarted ;
8585 }
8686
8787 private void Browser2_SourceChanged ( object sender , CoreWebView2SourceChangedEventArgs e )
8888 {
89- Url = Browser2 . Source . ToString ( ) ;
89+ Url = Browser . Source . ToString ( ) ;
9090 }
9191
9292 private async void UserControl_Loaded ( object sender , RoutedEventArgs e )
@@ -98,7 +98,16 @@ private async void UserControl_Loaded(object sender, RoutedEventArgs e)
9898 // Set user data folder - Fix #382
9999 var webView2Environment =
100100 await CoreWebView2Environment . CreateAsync ( null , GlobalStaticConfiguration . WebConsole_Cache ) ;
101- await Browser2 . EnsureCoreWebView2Async ( webView2Environment ) ;
101+
102+ await Browser . EnsureCoreWebView2Async ( webView2Environment ) ;
103+
104+ //await Browser.CoreWebView2.Profile.ClearBrowsingDataAsync();
105+
106+ // Set the default settings
107+ Browser . CoreWebView2 . Settings . IsStatusBarEnabled = true ;
108+ Browser . CoreWebView2 . Settings . AreDevToolsEnabled = false ;
109+ Browser . CoreWebView2 . Settings . IsGeneralAutofillEnabled = true ;
110+ Browser . CoreWebView2 . Settings . IsPasswordAutosaveEnabled = true ;
102111
103112 Navigate ( _sessionInfo . Url ) ;
104113
@@ -142,31 +151,31 @@ private bool ReloadCommand_CanExecute(object obj)
142151
143152 private void ReloadAction ( )
144153 {
145- Browser2 . Reload ( ) ;
154+ Browser . Reload ( ) ;
146155 }
147156
148157 private bool GoBackCommand_CanExecute ( object obj )
149158 {
150- return ! IsLoading && Browser2 . CanGoBack ;
159+ return ! IsLoading && Browser . CanGoBack ;
151160 }
152161
153162 public ICommand GoBackCommand => new RelayCommand ( _ => GoBackAction ( ) , GoBackCommand_CanExecute ) ;
154163
155164 private void GoBackAction ( )
156165 {
157- Browser2 . GoBack ( ) ;
166+ Browser . GoBack ( ) ;
158167 }
159168
160169 private bool GoForwardCommand_CanExecute ( object obj )
161170 {
162- return ! IsLoading && Browser2 . CanGoForward ;
171+ return ! IsLoading && Browser . CanGoForward ;
163172 }
164173
165174 public ICommand GoForwardCommand => new RelayCommand ( _ => GoForwardAction ( ) , GoForwardCommand_CanExecute ) ;
166175
167176 private void GoForwardAction ( )
168177 {
169- Browser2 . GoForward ( ) ;
178+ Browser . GoForward ( ) ;
170179 }
171180
172181 #endregion
@@ -175,12 +184,14 @@ private void GoForwardAction()
175184
176185 private void Navigate ( string url )
177186 {
178- Browser2 . Source = new Uri ( url ) ;
187+ Browser . Source = new Uri ( url ) ;
179188 }
180189
181190 private void Stop ( )
182191 {
183- Browser2 . Stop ( ) ;
192+ Browser . Stop ( ) ;
193+
194+
184195 }
185196
186197 public void CloseTab ( )
0 commit comments