2 messages · Page 1 of 1 (latest)
I am trying to figure out how do I emit an event inside of a command, but none of it succeed..
here's what I did first.. but it didn't work
#[tauri::command]
pub fn some_command(app: tauri::App) {
app.emit_all("an-event", /* .. */).unwrap();
}
also worth noting that, this is also inside of a plugin
Try app.handle().emit_all(event, payload).unwrap()