How Can We Help?
< Back
You are here:
Print

Event listen – verify that a chat was loaded fully

For developers: If you need to verify that a chat was loaded fully and ready to receive messages. You may listen to the ‘message’ event, and check if the event.origin is a valid RumbleTalk chat domain.

window.addEventListener(  ‘message’,  function (event) {    if ((/^https:\/\/\w+\.rumbletalk\.net$/).test(event.origin)) {      // chat loaded and ready
    }
  },  false
);


Categories