How can I prevent JavaScript in an iFrame to access properties of the outer site, even if the iFrame's content comes from the same origin?

后端 未结 2 703
挽巷
挽巷 2020-12-21 00:45

Basically I want to have an iFrame which always restricts it\'s content as if it comes from a different domain, even if the content comes from the same origin.

Is th

2条回答
  •  旧时难觅i
    2020-12-21 01:19

    This will hide window.parent in the child frame/window, but not the top property.

    BUT the window.parent property is STILL accessible till the end of the onload event of the child window/frame.

    
      
        
        
      
      
        

提交回复
热议问题