Iframe gets visible size

Inside the iframe, I need to figure out what exactly the visual size is (using js or jquery).

This example shows only the iframe part. The iframe is 300x300 in size, but the div limits it to 300x100.

<div style="max-width: 300px; max-height: 100px; overflow: hidden">
<iframe width="300" height="300" src="http://www.rapidtables.com/web/tools/window-size.htm" style="border:none"></iframe>
</div>

      

How can I determine the actual visible dimensions inside the iframe?

Tried

window.clientHeight
window.outerHeight
window.innerHeight
window.availableHeight
$(window).height();

      

+3


source to share





All Articles