JSFiddle - React, Tailwind, and code Playground

HTML

<head>
    <title>Firefox display:none; and $('iframe div').height() testing</title>
</head>

<!-- This onload happens after the iframe loads, so all code in iframe.html 
     runs before the reveal.-->
<body onload='alert(document.getElementById("asd").getWidth())'>
    <div id="asd">asdasdasdasd</div>
</body>

CSS

iframe {
    display:none;
}

div{
    width:100px;
    height:100px;
    display:none;
}

JavaScript

function reveal() {
alert(document.getElementById('asd').getSize());
}