Feeding information from URL into WASM app

I have an egui app which can be compiled to WASM and deployed with Trunk.

Is there some way of getting information from the URL of the app into the initial state of the app?

For example, if the app is deployed at https://path.to.my.app/arg1/arg2, is it possible to pass arg1 and arg2 to the app's main?

You can get the URL from the window object using the web-sys crate: wasm bindgen - Getting query string from Window object in WebAssembly in Rust - Stack Overflow

3 Likes