xmlplus
Version:
A JavaScript framwork for developing projects efficiently.
22 lines • 651 B
JavaScript
xmlplus("xp", function (xp, $_) {
$_().imports({
Index: {
xml: "<Wrapper>\
<button>foo</button>\
<button>bar</button>\
</Wrapper>"
},
Wrapper: {
xml: "<div>\
<h1 id='alice'>alice</h1>\
<button>bob</button>\
</div>",
map: { appendTo: "alice" },
fun: function (sys, items, opts) {
this.kids().forEach(function(item) {
console.log(item.text());
});
}
}
});
});