Marauroa Chat Tutorial/HTML5 Client: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
imported>Hendrik Brummermann
Line 135: Line 135:
For this really simple chat client, we are only interested in chat objects. Therefore we skip this step for now and work directly on the perception event for new objects:
For this really simple chat client, we are only interested in chat objects. Therefore we skip this step for now and work directly on the perception event for new objects:


<source lang="javascript">
marauroa.perceptionListener.onAdded = function(object) {
marauroa.perceptionListener.onAdded = function(object) {
if (object.has("text")) {
if (object.has("text")) {
Line 161: Line 162:
}
}
}
}
</source>

Note: When putting all together, you need to merge the "ui" package from the previous section with the one defined here.


== Deployment ==
== Deployment ==