uno.extensions icon indicating copy to clipboard operation
uno.extensions copied to clipboard

[Navigation] Add Support for Navigator on WebView2 with NavigationCache or History?

Open DevTKSS opened this issue 5 months ago • 0 comments

What would you like to be added:

Extensions Navigator for WebView2 that:

  • should be able to have NavigationCache, which could be implemented via NavigationCompleted + Source so we could get a List<Uri> for example instead of blindly executing the WebView2.GoBack() or GoForward() in our UI codebehind for example.

it could also (nice to have) the funtionallity:

  • make those Web Navigation functions available on the Navigator like we normally use them or could also be a Interface of a Navigator we would then ask the ctor in our Mvux or Mvvm Model for

Why is this needed:

  • the WebView2 itselfs provides not build in Property of History then only those events to listen to and manually create a List of past navigations, which is of course the UI layer, but we mostly target in mvux to not have to use the codebehind and events, then most of the time Commands or directly Binding in our xaml.
  • Was searching for some existing Service that is keeping the NavigationCache we define in our Page Header, but was not successfull so far.
  • we would not longer have to care about eventual history or transfering those things ourselfs from UI to VM layer and most likly be not very successfull or implement bugs in our code depending on our knowledge level for those advanced things like how to use the Dispacher or whatever else might be required.

For which Platform:

  • [x] iOS
  • [x] Android
  • [x] WebAssembly
  • [ ] WebAssembly renders for Xamarin.Forms
  • [x] Windows
  • [x] Desktop
  • [ ] Build tasks

Anything else we need to know?

  • Seems like there is already an BrowserAddressBarService definition as internal, maybe you could somehow reuse this? e.g. I do normally set a AddressBar either way for that control and normally in any Browser I use (which is for me the WebView also) there is an AddressBar so would make sense either way. could be a cool UI addition for that Control also, similar like Uno Extensions Navigation UI did define other control enhancing additions

DevTKSS avatar Sep 10 '25 20:09 DevTKSS