Iframe Events
    • Dark
      Light
    • PDF

    Iframe Events

    • Dark
      Light
    • PDF

    Article summary

    When the iframe integration is enabled, some events are triggered. These events include the following:

    Event name

    Description

    startup

    Fired when an iframe initializes

    notification

    Fired when a user receives a notification

    unread-changed-by-subscription

    Fired each time a user's subscription record changes (i.e.: unread counts, etc)

    unread-changed

    Fired when the pages title changes

    room-opened

    Fired when a room is opened

    new-message

    Fired every time the opened room receives a new message

    click-user-card-message

    Fired when the user clicks on a username link

    click-mention-link

    Fired when the user clicks on a mention link

    click-message-link

    Fired when the user clicks on a posted link

    click-action-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
    });


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence