打开iframe作为新的干净文档/窗口

发布于 2025-01-25 22:32:57 字数 179 浏览 5 评论 0原文

我正在尝试将代码从代码和iframe加载,但不会加载。

可能是在检查是否有父窗口从其他域中打开它。

有什么方法可以将其隐藏并让它像在新的干净窗口中打开一样。

我无法使用嵌入的codesandbox,因为它正在引入另一个嵌套帧,这使我无法postmessage到我的代码中。

I am trying to load code from codesandbox into iframe, but it is not going to load.

Probably it is checking if there is parent window opening it from other domain.

Is there any way to hide it and make it think like it was open in new clean window.

I can't use codesandbox embed, because it is introducing another nested frame, which makes impossible for me to postMessage to my code in sandbox.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文