Open
Description
openedon Sep 18, 2024
Description
Adding Source Property.
In the case of serving SPA with HybridWebView, there will be cases where you want to access deep pages directly, such as with hash.
Public API Changes
Code behind
this.myHybridWebViewConfigPage.Source = "/#/config"; // navigate to `app://0.0.0.0/#/config`
and XAML
<HybridWebView
HybridRoot="hybrid_root"
RawMessageReceived="OnHybridWebViewRawMessageReceived"
Source="/#/config" <- New
x:Name="myHybridWebViewConfigPage" />
Intended Use-Case
I have a Single Page Application created in React and hosted in HybridWebView.
Of course, we can navigate to the SPA root page by loading index.html.
However, we cannot navigate directly to the child route pages because we cannot set the URLs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment