When the iframe integration is enabled, some events are triggered. These events include the following:
Event name  | Description  | 
|---|---|
  | Fired when an iframe initializes  | 
  | Fired when a user receives a notification  | 
  | Fired each time a user's subscription record changes (i.e.: unread counts, etc)  | 
  | Fired when the pages title changes  | 
  | Fired when a room is opened  | 
  | Fired every time the opened room receives a new message  | 
  | Fired when the user clicks on a username link  | 
  | Fired when the user clicks on a mention link  | 
  | Fired when the user clicks on a posted link  | 
  | Fired when the user clicks on an action link button (i.e.: "click to join" to video conferences)  | 
Here is a sample code that listens to events fired from Rocket.Chat opened on an iframe:
window.addEventListener('message', function(e) {
    console.log(e.data.eventName); // event name
    console.log(e.data.data); // event data
});