Unsafe JavaScript attempt to initiate navigation for frame with URL 'http://www.xxx.xxx/' from frame with URL "https://open.weixin.com/xxxxxxx" The frame attempting navigation is targeting its top-level window, but is neither same-origin with its target nor is it processing a user gesture
今天在开发微信扫码登陆的时候,在谷歌浏览器调试的时候遇到了这样一个问题,后来查了半天,才发现原来是iframe的问题,
iframe 有个属性sandbox
allow-same-origin | 允许 iframe 内容被视为与包含文档有相同的来源。 |
allow-top-navigation | 允许 iframe 内容从包含文档导航(加载)内容。 |
allow-forms | 允许表单提交。 |
allow-scripts | 允许脚本执行。 |