Embed Events

Free

Actions

You can listen to an action that occurs in embedded cal link as follows. You can think of them as DOM events. We are avoiding the term "events" to not confuse it with Cal Events.

<script>
  Cal("on", {
    action: "ANY_ACTION_NAME",
    callback: (e)=>{
      // `data` is properties for the event.
      // `type` is the name of the action(You can also call it type of the action.) This would be same as "ANY_ACTION_NAME" except when ANY_ACTION_NAME="*" which listens to all the events.
      // `namespace` tells you the Cal namespace for which the event is fired/
      const {data, type, namespace} = e.detail;
    }
  })
</script>

Following are the list of supported actions.

ParamaterRequiredDescription
No

Actions that start with __ are internal.

To get more details on how Embed actually works, you can refer to this Embed Flowchart.

Was this page helpful?