LogoRobo.js
Framework

emit()

Function: emit()

function emit(
   type, 
   data, 
   options?): string

Emits an IPC event to the outbox for the host to process.

Parameters

ParameterTypeDescription
typestringEvent type (e.g., "open:url", "notify")
dataunknownEvent payload
options?IpcEmitOptionsOptional 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!' })

On this page