Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Further events might be added in the future based on requirements.

“send2crmMessengerToggled” event

An event is triggered when the Messenger element is toggled. The event allows the host website to appropriately react to the state change.

The following data is available on the event.detail object:

{
  isExpanded: Boolean // Whether or not the Messenger element is expanded
}

Example implementation:

const messenger = document.querySelector("send2crm-messenger");

messenger.addEventListener("send2crmMessengerToggled", (e) =>
  console.log(`Messenger is ${e.detail.isExpanded ? "expanded" : "collapsed"}`),
);

  • No labels