Skip to content

How to set the window url in rust at runtime? #5377

Answered by FabianLars
jourdain asked this question in Q&A
Discussion options

You must be logged in to vote

There indeed is no direct api for that (yet), so instead you need to use eval to execute js code. Something like this:

main_window.eval(&format!("window.location.replace('http://localhost:{}')", "1234"));

Replies: 7 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by jourdain
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@FabianLars
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jourdain
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants