tauri::event
pub fn emit<S: Serialize>( webview: &mut WebviewMut, event: impl AsRef<str> + Send + 'static, payload: Option<S>) -> Result<()>
Emits an event to JS.