1

I need to find out the browser viewport size from within a cross-domain iframe. The normal method doesn't work because it only gets the viewport of the iframe. If I use top.innerHeight, etc. in a cross-domain situation, I run into security issues. Is there a different property/method I can use? Cross-browser would be ideal, but even getting this on a single browser would be helpful.

(I'm trying to find out if my iframe is in view or not.)

Community
  • 1
  • 1
sprugman
  • 19,351
  • 35
  • 110
  • 163
  • 1
    This (knowing whether an iFrame is in view or not) has been discussed once, but I can't find the duplicate. IIRC, the conclusion back then was that it is not possible. – Pekka Feb 01 '11 at 23:13
  • Related/somewhat similar: http://stackoverflow.com/questions/1860931/what-optimizations-does-a-browser-perform-when-a-dom-element-is-being-rendered-of – Pekka Feb 01 '11 at 23:15
  • thanks. hmm... yeah, I was afraid of that... – sprugman Feb 02 '11 at 03:51

0 Answers0