UNPKG

marko

Version:

UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.

19 lines (16 loc) 423 B
var parseHTML = function (html) { var container = document.createElement("template"); parseHTML = container.content ? function (html) { container.innerHTML = html; return container.content; } : function (html) { container.innerHTML = html; return container; }; return parseHTML(html); }; module.exports = function (html) { return parseHTML(html).firstChild; };