Event Callbacks

Our embed code provides callbacks for any event that fires within an Spot.IM frame. So you can use a callback inside your website to an event fired inside Spot,IM frames.

Spot.IM embed code provides a list of event callbacks. Use these callbacks inside your website after an event fires within the Spot.IM frame.

Top

Current User Typing Start

Fires when the screen focus moves to a text area within an the Spot.IM frame.

document.addEventListener('spot-im-current-user-typing-start', function() {
    console.log('User is typing!');
}, false);
Top

Current User Typing End

Fires when screen focus moves away from a text area within an Spot.IM frame.

document.addEventListener('spot-im-current-user-typing-end', function() {
    console.log('User end typing!');
}, false);
Top

Current User Sent Message

Fires when current user creates or updates a message.

document.addEventListener('spot-im-current-user-sent-message', function() {
    console.log('User sent message!');
}, false);
Top

Newsfeed Load

Fires when a newsfeed DIV element appends to the DOM.

document.addEventListener('spot-im-newsfeed-load', function() {
    console.log('Newsfeed load!');
}, false);