JSFiddle - React, Tailwind, and code Playground

by Chris Maloney

HTML

<h2 id='e0'>Experiment #0</h2>

JavaScript

var e0 = document.getElementById('e0');


function appendHtml(el, str) {
  var div = document.createElement('div');
  div.innerHTML = str;
  while (div.children.length > 0) {
    el.appendChild(div.children[0]);
  }
}

appendHtml(e0, '<div>Hey, Zombo!</div>');