Skip to content

Commit

Permalink
Register plugin first
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master committed Dec 9, 2024
1 parent 50659f5 commit cba84b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/opener/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ use tauri_plugin_opener::OpenerExt;

fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.setup(|app| {
let opener = app.opener();
opener.open_url("https://example.com", Some("firefox"))?;
opener.open_path("/path/to/file", Some("firefox"))?;
opener.reveal_item_in_dir("/path/to/file")?;
Ok(())
})
.plugin(tauri_plugin_opener::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
Expand Down

0 comments on commit cba84b1

Please sign in to comment.