JSFiddle - React, Tailwind, and code Playground

HTML

<div id="tablelike" style="display:table"><!-- test -->someText<!-- test --></div>
<button id='crashBtn'>
Crash
</button>

JavaScript

var mutationObserver = new MutationObserver(function(mutations){});
mutationObserver.observe(document, {childList: true, subtree: true});

function crash() {
  var elem = document.getElementById("tablelike");
  elem.removeChild(elem.firstChild.nextSibling);
}

document.getElementById('crashBtn').onclick = crash;