Replies: 2 comments 3 replies
-
maybe try the on_navigation hook? The Windows webview starts on about:blank for a split second which is iirc outside of our control (we tell it about the correct url before/on creation). Why do you even need the url when you set it yourself? |
Beta Was this translation helpful? Give feedback.
-
@FabianLars thanks for your suggestions. I have now implemented this via navigate() and by using the preivously saved URL. Now on android, I found that the navigation is not working: I will further look into this and try to provide more details. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I try to change the URL during app startup. I used to use window.eval but I found that sometimes this is causing a error. So I try to move from window.eval() to WebviewWindow.navigate()
Now I need to get the URL on server side. Is there a way to get the proper URL? I tried the following code which works on linux but not on windows. On windows, the URL is about:blank.
// pseudo code
let app = tauri::Builder::default()
.setup(|app| {
let mut main_window = app.get_webview_window("main").unwrap();
match main_window.url() {
Ok(url) => {
println!("The URL is: {}", url); // on linux the proper URL is returned on windows its "about:blank"
Beta Was this translation helpful? Give feedback.
All reactions