Emits an event to all targets matching the given target.
Label of the target Window/Webview/WebviewWindow or raw EventTarget object.
Event name. Must include only alphanumeric characters, -, /, : and _.
-
/
:
_
Optional
Event payload.
import { emitTo } from '@tauri-apps/api/event';await emitTo('main', 'frontend-loaded', { loggedIn: true, token: 'authToken' }); Copy
import { emitTo } from '@tauri-apps/api/event';await emitTo('main', 'frontend-loaded', { loggedIn: true, token: 'authToken' });
2.0.0
Emits an event to all targets matching the given target.