Framework
emit()
Function: emit()
function emit(
type,
data,
options?): stringEmits an IPC event to the outbox for the host to process.
Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | Event type (e.g., "open:url", "notify") |
data | unknown | Event payload |
options? | IpcEmitOptions | Optional target and ref |
Returns
string
The generated event ID
Example
import { emit } from 'robo.js/ipc'
emit('open:url', { url: 'https://example.com' })
emit('notify', { level: 'info', title: 'Hello!' })