Skip to main content

on()

Adds a callback function to execute after a specific event is emitted.

Syntax

on(event, callback)

Parameters

event

A case-sensitive string to define a callback for.

callback

The function to call when the event happens.

Events

Event NameDescription
openEmitted when Solvvy is opened
closeEmitted when Solvvy is closed
showEmitted when Solvvy is shown
hideEmitted when Solvvy is hidden
contact_supportEmitted when support is contacted
send_messageEmitted when a message is sent

Event Emit Demo

All the above events when emitted will be logged in the console below.

Example

Solvvy.on('open', () => {
console.log('solvvy opened');
});