Cobrowse.Events Methods

The events that can be accessed through the Cobrowse.Events object supports some methods.

Methods

N

Method Name

Parameters

Description

1 listen(callback) callback: pointer to a function which will be called when the event is dispatched Adds a listener to the list of subscribers to the event.

Example: Cobrowse.Events.SessionStarted.listen(function (evt){console.log("The session started event fired, the 6-digit code is: " + evt.accessCode);});

2 removeListener(callback) callback: pointer to a function which should be removed from the subscribers list Removes a subscriber from the list of event listeners