“复制为HTML”在Chrome检查器中嵌套的IFrame元素上 [英] "Copy as HTML" on nested IFrame elements in Chrome Inspector

查看:145
本文介绍了“复制为HTML”在Chrome检查器中嵌套的IFrame元素上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome的网络检查器中,如果您右键单击DOM元素,则会有一个复制为HTML选项,该选项通常会为您提供该元素及其所有子元素的HTML字符串。但是,尽管IFrame标签在检查器中显示为子节点,但它似乎从未包含过它的内容。

In Chrome's web inspector, if you right-click a DOM element there's a "Copy as HTML" option that will normally give you an HTML string of that element and all its children. However, it doesn't seem to ever include the contents of IFrame tags despite the fact they appear in the inspector as child nodes.

问题不是由交叉引起的域名限制:即使是相同域名的IFrame也不会从复制的HTML中排除。

The problem isn't caused by cross-domain restrictions: Even same-domain IFrames are excluded from the copied HTML.

除了复制并粘贴每个嵌套IFrame的HTML根目录并在文本编辑器中手动将它们拼接在一起之外,还有什么方法可以解决?我在一个网站上工作,该网站的第三方广告脚本通常会生成庞大的,庞大的嵌套iframe树,并且我需要一种方法让同事能够复制并粘贴该结构,以便在不坐下来的情况下调试广告问题

Is there any way around this, short of just copy-and-pasting the HTML root of every nested IFrame and manually stitching them together in a text editor? I work for a site whose third-party ad scripts often produce large, sprawling trees of nested IFrames, and I need a way for coworkers to be able to copy-and-paste that structure so I can debug ad issues without my physically sitting down at their desk.

推荐答案

我终于找到了一个解决方案,它是通过一个名为 Save Page WE 的Chrome扩展程序通过DW-dev。

I finally found a solution, via a Chrome Extension called Save Page WE by DW-dev.

https://chrome.google.com/webstore/detail/save-page-we/dhhpefjklgkmgeafimnjhojgjamoafof

它也可用于Firefox 。
https://addons.mozilla.org / en-US / firefox / addon / save-page-we /

It is also available for Firefox. https://addons.mozilla.org/en-US/firefox/addon/save-page-we/

这篇关于“复制为HTML”在Chrome检查器中嵌套的IFrame元素上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆