Use Events Defined in a Dependency

A dependency might define events that you can use in your extension to start action chains. In the Events tab of your page or Layout, you can see which events are Triggerable and/or Listenable by your extension. When you select an event in the Events tab, you can see details about the event in the Properties pane, such as the where it is defined, what triggers the event and the event's behavior type.

Description of designer-custom-events.png follows
Description of the illustration designer-custom-events.png

In this image you can see that the event defined in the base app (clickBack) is badge with base, and that it's designated as listenable by the app extension, meaning you could add an event listener to your app extension that listens for the clickBack event. You can't change the designation of custom events defined in the base app, but you can use them to start action chains defined in the base app or in your app extension.

Event Designation Description
Triggerable

Triggerable events are used to start action chains defined in the base app. If an event is designated as Triggerable, you can call the event from an action chain in your app extension using the Fire Event action.

For example, the base app might define an action chain that opens a popup window, and define a custom event (for example, openPopup) and event listener to trigger the action chain. If the custom event is Triggerable, you can call the event from your app extension. So if you want to use that action chain when a user selects a specific option, you can add the Fire Event action to the action chain in your app extension that is triggered when the option is selected. In the Actions editor, you would choose the openPopup event when you configure the Fire Event action.

Listenable

Listenable events are used to start action chains defined in your app extension. If an event in the base app is designated as Listenable, you can add an event listener to your app extension and configure it to trigger your action chain when the listenable event occurs.

For example, you can use listenable events to:

  • execute an app extension action chain asynchronously or synchronously

  • cancel an event in the app extension action chain

  • transform a return value that is passed between the layers of event listeners