« Index of all namespaces of this project
Take the &env from a macro, and tell whether we are expanding into cljs. Source: https://groups.google.com/d/msg/clojurescript/iBY5HaQda4A/w1lAQi9_AwsJ
(default-emit object event data)
Emit implementation that delegates handling to the [[aide.event-api/Event]] instance itself. Most likely you don't need to call this function directly. See [[emit]] instead.
(defevent sym & fdecl)
defn-like macro that creates a serializable [[aide.event-api/Event]] from the function. Returns a var with [[aide.var-event/VarEvent]] value.
(defevent* defn-sym sym & fdecl)
The same as [[defevent]] but allows specifying a custom defn macro (e.g. schema.core/defn).
(emit object event)
(emit object event data)
Emits the event into the specified object. Returns the event handling result (depends on the object and/or event). Object is a map that contains a function of `[object event data]` at ::emit key. Event data is nil by default. Essentially, this is a shorthand/syntax sugar on top of `(::emit object)`.
Creates an object from the specified map using [[default-emit]] by default. You can provide a custom ::emit to change the semantics of event emitting. E.g. to support some new kind of events (e.g. keywords + multi-methods). But make sure it still supports [[aide.event-api/Event]] instances in order to make it compatible with third-party packages and standard [[on-start]]/[[on-stop]] events.