Register event listener for specific events.
a handle to unregister from the event
Register event listener for any event.
must be "*"
for this overload
the event handler callback will be invoked when any event has been emitted
a handle to unregister from the events
Register event listener for the events listed in eventName
.
Comma separated event names are possible, for example "eventA,eventB"
.
the event name or list of names
the event handler callback
a handle to unregister from the event(s)
Trigger the actions and return their response as a list of Promises.
List of action IDs to trigger.
To trigger all available actions pass a list with only one entry: ["*"]
.
Optional
options: ActionOptionsOptions to be passed to the actions. This can, for example, include the items of a search result.
List of Promises with the actions' result of their trigger
methods.
Generated using TypeDoc
The ActionService provides access to
map-actions.Action
instances.An instance of this class can be referenced using the service name
map-actions.ActionService
. The service can be used in different workflows to trigger the same functionality.The action service will emit events
action-added
andaction-removed
when a new action is registered or an existing action is unregistered. In both cases, an object{id: "action-id"}
is passed to the event handler.