JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<frameset cols="25%,40%,*%">
<frame src="contentstart.html" name="content" />
<frame src="content.html" name="content2" />
<frame src="content.html" name="content3" />
</frameset>
</body>
JavaScript
window.setInterval(function () {
check();
}, 50);
function check() {
var content1 = document.getElementsByName("content")[0].contentDocument.body;
var content3 = document.getElementsByName("content3")[0].contentDocument.body;
if (isEmpty(content3)) {
if (isEmpty(content1)) setProperties("0px, *, 0px");
else setProperties("35%, *, 0px");
} else setProperties("25%, 40%, 35%");
window.localStorage.clear();
}
function isEmpty(e) {
return (e.offsetWidth != 0);
}
function setProperties(value) {
document.getElementsByTagName("frameset")[1].cols = value;
}