Skip to main content

emit

Forward a named event from the current component boundary.

Quick reference​

SyntaxBehavior
emit saved with payloadSend JSON output.
emit savedSend an event without an authored payload.

Example​

<Button title="Save" on-press="emit saved with {id:'a'}" />

Rules and validation​

Static emit commands define a template’s output events. The caller listens with on-saved. Events from fill content belong to the caller scope. Delivery queues after the current synchronous script segment; root events reach the host callback.

Composition lesson · Events