Contents | Index | Previous | Next
TAgentJS.addTDataListenerJS() Method
subscribe for private messages
Synopsis
Tango_agent.addTDataListenerJS(document);
Arguments
document Object implementing TDataListenerJS interface. A document to receive session
messages.
Returns
Nothing.
Description
Method addTDataListenerJS() adds a recipient of the session's private data
sent by another participant of the session. Calling this function is a necessary
step to start any collaboration.
Example
Applications normally register listener interfaces once, right after
registration in Tango.
<script>
- ar Tango_agent=//register in Tango
Tango_agent.addTDataListenerJS(this);
function Tango_receive(message)
{
alert("Message arrived: "+message);
}
</script>
See Also
TDataListenerJS interface, TAgentJS.removeTDataListenerJS() method