开发者

viewport of browser from cross-site iframe

开发者 https://www.devze.com 2023-02-08 13:10 出处:网络
I need to find out the browser viewport s开发者_JAVA技巧ize 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

I need to find out the browser viewport s开发者_JAVA技巧ize 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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消