File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 869
869
* @return {boolean } true if window is on screen.
870
870
*/
871
871
function isFrameVisible ( window ) {
872
- var iframe = getIFrameForWindow ( window ) ;
873
- if ( ! iframe ) {
874
- return true ;
875
- }
872
+ try {
873
+ var iframe = getIFrameForWindow ( window ) ;
874
+ if ( ! iframe ) {
875
+ return true ;
876
+ }
876
877
877
- var bounds = iframe . getBoundingClientRect ( ) ;
878
- var isVisible = bounds . top < window . parent . innerHeight && bounds . bottom >= 0 &&
879
- bounds . left < window . parent . innerWidth && bounds . right >= 0 ;
878
+ var bounds = iframe . getBoundingClientRect ( ) ;
879
+ var isVisible = bounds . top < window . parent . innerHeight && bounds . bottom >= 0 &&
880
+ bounds . left < window . parent . innerWidth && bounds . right >= 0 ;
880
881
881
- return isVisible && isFrameVisible ( window . parent ) ;
882
+ return isVisible && isFrameVisible ( window . parent ) ;
883
+ } catch ( e ) {
884
+ return true ; // We got a security error?
885
+ }
882
886
} ;
883
887
884
888
/**
You can’t perform that action at this time.
0 commit comments