JSFiddle - React, Tailwind, and code Playground
by lavezzi
JavaScript
function toNode(html) {
var doc = document.documentElement.cloneNode(false);
doc.innerHTML = html;
return doc;
}
var node = toNode('<html><head><title> This is the old title. </title></head></html>');
console.log(node);