Open Bug 969818 Opened 10 years ago Updated 2 years ago

Remove #document node from HTML pane in Inspector

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: codacodercodacoder, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140127194636

Steps to reproduce:

The node with name #document appears as the first child node of iframe elements.  It serves (AFAICT) no useful purpose. When selecting this node

  1 - no pane to the right shows any useful info
  2 - the breadcrumb bar is cleared

yet, the entire html hierarchy of the embedded doc becomes its descendents?

If I am wrong and this node does serve some purpose, why is it not present in the breadcrumbs bar?
Component: Untriaged → Developer Tools: Inspector
You're right, it doesn't seem to serve any kind of purpose in the inspector.
There's one usecase I can see though, but its usefulness is arguable: 
- Select the #document node right below the iframe node
- Then go and type $0 in the web console tab (or split console)
=> This allows you to inspect easily the properties of the document in the iframe.
But again, this doesn't really seem to fit in the markup-view. You could do the same by selecting the iframe, and then entering $0.documentElement in the console.

Brian, Mike, what do you think?
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Priority: -- → P2
Hardware: x86_64 → All
Version: 30 Branch → Trunk
The node doesn't have much purpose other than the $0 use case Patrick says, and I suppose giving extra visual indication that the content is inside an iframe.  This indication could be given in different ways (maybe extra nesting or a light border to the left of the iframe content), or we may not need it at all.  It also seems that the 'Delete Node' context menu item isn't working.

One thing to consider is that with upcoming support for inspecting shadow DOM, using a header node like this could be handy for nesting content below the ShadowRoot.  This doesn't mean that we need to keep it for iframes, just that we will probably want to fix this UI component as Russ mentions (adding breadcrumb support, making sure context menu items work, etc).
See Also: → 1269527
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.