step1
1
2
3
<script src="xrtml.js" type="text/javascript"/>
step2
1
2
3
4
5
6
7
8
var connectionJSON = {
appkey:"myAppKey", authtoken:"myDevToken",
url:"http://developers2.realtime.livehtml.net/server/2.0/",
channels:[{name:"myChannel"}]
};
xRTML.addEventListener("ready", function() {
xRTML.createConnection(connectionJSON);
});
step3
1
2
3
4
5
6
7
8
var repeaterJSON = {
name:"Repeater", target:"#list",
template:{content:"<!-- [ <li> [xRTML:arg] </li> ] -->"},
triggers:[{name:"myTrigger"}]
};
xRTML.addEventListener("ready", function() {
xRTML.createTag(repeaterJSON);
});