JSFiddle - React, Tailwind, and code Playground
HTML
<div style="height:321px">
<div class="frame">
<iframe id="myframe" width="100%"></iframe>
</div>
</div>
CSS
.frame {
height: 100%;
}
JavaScript
with (document.getElementById ('myframe')) {
setAttribute('height', parentElement.clientHeight);
contentDocument.body.innerHTML = 'My height is ' + clientHeight + 'px';
}