JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"><<</div>
JavaScript
$(function(){
var t = $('#test');
t.text(t.html());
alert('wait');
t.html(t.text());
});
<div id="test"><<</div>
$(function(){
var t = $('#test');
t.text(t.html());
alert('wait');
t.html(t.text());
});