报错信息如下
Unsafe JavaScript attempt to initiate navigation for frame with URL ‘http://xxxx’ from frame with URL ‘http://yyyy’. The frame attempting navigation is targeting its top-level window, but is neither same-origin with its target nor has it received a user gesture

在iframe加上这个代码之后 sandbox="allow-scripts allow-top-navigation allow-same-origin"
sandbox包含的属性及作用:

allow-forms :允许进行提交表单;

allow-scripts :运行执行脚本;

allow-same-origin: 允许同域请求,比如ajax,storage;

allow-top-navigation: 允许iframe能够主导window.top进行页面跳转;

allow-popups: 允许iframe中弹出新窗口,比如,window.open,target=”_blank”;

allow-pointer-lock: 在iframe中可以锁定鼠标,主要和鼠标锁定有关。
GitHub 加速计划 / vu / vue
207.54 K
33.66 K
下载
vuejs/vue: 是一个用于构建用户界面的 JavaScript 框架,具有简洁的语法和丰富的组件库,可以用于开发单页面应用程序和多页面应用程序。
最近提交(Master分支:2 个月前 )
73486cb5 * chore: fix link broken Signed-off-by: snoppy <michaleli@foxmail.com> * Update packages/template-compiler/README.md [skip ci] --------- Signed-off-by: snoppy <michaleli@foxmail.com> Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> 4 个月前
e428d891 Updated Browser Compatibility reference. The previous currently returns HTTP 404. 5 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐