This is supported on crate feature
shell-open-api only.Expand description
Opens path or URL with the program specified in with, or system default if None.
The path will be matched against the shell open validation regex, defaulting to ^https?://.
A custom validation regex may be supplied in the config in tauri > allowlist > scope > open.
Examples
use tauri::{api::shell::open, Manager};
tauri::Builder::default()
.setup(|app| {
// open the given URL on the system default browser
open(&app.shell_scope(), "https://github.com/tauri-apps/tauri", None).unwrap();
Ok(())
});