Skip to content

[feat] Webview::navigate should take WebviewUrl as param instead of raw Url #14583

@yashsriv

Description

@yashsriv

Describe the problem

I'm trying to perform a navigation to an external Url and then back to the app after the external Url invokes some command. I'm facing an issue with the navigation back to the app.

I used the following to go back to the app (since I'm on mobile platform):

webview_window.navigate("http://tauri.localhost/".parse()?);

The problem I am facing is that the proxy to the development viteserver is not working?? (not sure):

Image

Probably because there is a lot of logic for handling the App url when setting up a webview:
https://github.com/tauri-apps/tauri/blob/dev/crates/tauri/src/manager/webview.rs#L414-L432

Describe the solution you'd like

I would like to know how to perform the navigation but also I think webview.navigate should actually take a WebviewUrl as input since that is also what we use when setting up the webview programmatically!

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: breaking changeThis issue or pull request will introduce a breaking change and requires major version bumptype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions