Chrome Inspector中输入元素中的“#document-fragment”元素是什么?

时间:2014-02-06 11:16:47

标签: google-chrome web-inspector documentfragment

有一段时间,当我检查Chrome中的输入时,我会看到那些奇怪的#document-fragment灰色元素。我也注意到有时候会有更多,有时甚至更少。

这些东西是什么?有没有办法在检查员中隐藏它们?

1 个答案:

答案 0 :(得分:5)

您可以在检查器中看到此信息,因为您已激活“Show Shadow DOM”选项。 您可以在“元素”

下的常规设置选项卡中找到此设置

如果您停用它。这些碎片将从您的检查员中消失

Chrome inspector settings

Shadow DOM是元素的内部元素,对最终用户是隐藏的。其节点不是<my-custom-element><input>或......(http://www.polymer-project.org/platform/shadow-dom.html#shadow-dom-subtrees

的子节点

您可以在此处找到更多信息: