Events
You can listen for emitted events by subscribing to them using the on method with your custom callback. For example, your function can be executed every time the widget is opend
Chathive.widget.on
Subscribes to emitted events, which are described below. This function returns a subscription id that can be used to unsubscribe.
Chathive.widget.off
Unsubscribes from emitted events, which are described below.
Events list
Event name | Description |
---|---|
widget.init | Widget has been initialised and is ready to be used |
widget.opened | Widget is opened |
widget.closed | Widget is closed |
message.inbound | New message is received. Messages are send partially and need to be reconstructed |
message.outbound | Message is send by the user |
typing.started | Is typing is triggered by the agent |
typing.stopped | Is typing stopped |
Last updated