Skip to content

[feat] Improved native navigation API #4080

@jhutchins

Description

@jhutchins

Currently the ability to access and control navigation on a Window from the native rust code is extremely limited. The best you can hope for is evaluating JavaScript to change the URL. Since the native WebView APIs provide information regarding current URL with the ability to change it would make nice to expose some form of this from the Window structure.

Ideally there would be hooks to get the current window URL, navigate to a new URL and the ability to register listeners for changes in URL. WRY already provides a mechanism for attaching a navigation controller that's called every time the view URL changes. This could easily be used to provide navigation events as well as the ability to limit navigation to external URLs. Likewise, the native WebView structures allow retrieving and changing the URL, it's just a matter of creating a unified interface for accessing and manipulating that information and then plumbing it through the many abstraction layers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions