I'm working on detecting whether my content is outside the iframe or not. I've been trying a straight forward case, but still not able to detect, basically I'm padding the iframe such that the document inside iFrame goes outside it's body.
I somehow need my document to say "hey I'm outside the iframe's viewport".
Have tried using clientHeight, BoundingClientRect(), visibilityState of document, but nothing seems to work. Adding a example:
<html>
<head></head>
<body>
<b>iframe-4 includes the ad-iframe</b>
<iframe style="overflow:hidden; height:400px; width:400px; padding-left:700px; padding-top:750px" src="simpleHtmlDocWithoutAnyFancyStuff.html" scrolling="no">
</body>
</html>