nectarjs
Version:
Javascript's God Mode. No VM. No Bytecode. No GC. Just native binaries.
9 lines (7 loc) • 340 B
JavaScript
var _tpl = "<h1>{{CONTENT}}</h1><br>Text: <input id='test' type='text' /><br>";
_tpl += "<button onClick='Nectar.fireEvent(document.getElementById(\"test\").value);'>Update</button>";
Nectar.draw(_tpl.replace("{{CONTENT}}", "Hello NectarJS !"));
Nectar.onEvent = function(_event)
{
Nectar.draw(_tpl.replace("{{CONTENT}}", _event));
};