JSFiddle - React, Tailwind, and code Playground
HTML
<table border="1">
<tr>
<td>The time is </td>
<td id="enyoTarget"></td>
<td> in your locale</td>
</tr>
</table>
JavaScript
enyo.kind({
name:"TimeWidget",
kind:"Control",
components:[
{name:"time", kind:"Control"}
],
create:function() {
this.inherited(arguments);
this.updateTime();
},
updateTime:function() {
var d = new Date();
this.$.time.setContent([d.getHours(),d.getMinutes(),d.getSeconds()].join(":"));
setTimeout(enyo.bind(this, "updateTime"), 1000);
}
});
new TimeWidget().renderInto(document.getElementById("enyoTarget"));