marko/taglibs/layout/use-tag.js
Patrick Steele-Idem 069b3e5ba9 Initial commit for marko v3 with htmljs-parser
Work-in-progress. Lots of failing tests.
2015-11-24 14:30:32 -07:00

15 lines
381 B
JavaScript

module.exports = function render(input, context) {
var content = {};
if (input.getContent) {
input.getContent({
handlePutTag: function (putTag) {
content[putTag.into] = putTag;
}
});
}
var viewModel = input['*'] || {};
viewModel.layoutContent = content;
input.template.render(viewModel, context);
};