-
How can I use 'app' in #[tauri::command] like this Maybe there is something in the 'invoke handler' that I don't know about. |
Beta Was this translation helpful? Give feedback.
Answered by
abisar
Aug 29, 2022
Replies: 1 comment 1 reply
-
I missed it too when I first started with tauri. It's here: #[tauri::command]
fn open_devtools(app_handle: AppHandle) {
app_handle.get_window("main").unwrap().open_devtools();
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zhibisora
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I missed it too when I first started with tauri. It's here:
https://tauri.app/v1/guides/features/command/#accessing-an-apphandle-in-commands