I doubt this is actually possible but Im prepared to be corrected.
What I need is to be able to detect the width and height of an iframe from within the iframe, so if the iframe src
is iframeContent.html
I need to be able to surface the values on this page.
I have no control over the page that hosts the iframe only the contents of the iframe.
Is this possible?
You can always get the web page dimensions, no matter if the page is loaded inside an
iframe
or a new window it always works the same way. This is a function I've found used to getwindow
dimensions, you can also use it to get an<iframe>
dimensions.