Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function _render (tag) {
var html = sdom.serialize(tag.root)
// unmount the tag avoiding memory leaks
tag.unmount()
return html
}
riot.render = function(tagName, opts) {
var root = document.createElement(tagName);
var tag = riot.mount(root, opts);
if(tag && tag[0].done) {
return {tag: tag[0], root: root, dom: function(root) {
return sdom.serialize(root);
}};
}else {
return sdom.serialize(root);
}
};
return {tag: tag[0], root: root, dom: function(root) {
return sdom.serialize(root);
}};
}else {