Skip to main content
DOM Inspector FAQ
- How do I inspect a web site?
- Enter a URL into Inspector's URL bar, and hit Enter. Alternately, you can select the File > Inspect a URL menu option from within Inspector. Or if you want to inspect an open XUL window, you can use File > Inspect a Window to select one.
- Why do some nodes in the Document DOM Node View appear in red?
- These nodes are anonymous content nodes, meaning they are not in the DOM generated by the original document.
- Okay, what if I don't want to see those anonymous nodes?
- You can hide anonymous nodes in inspector by unchecking the View > Show Anonymous Content menu item.
- I see a lot of empty #text nodes that I don't see in the original document. What are they, why are they there, and how can I get rid of them?
- Those text nodes are actually the newlines and spacing between the elements. Please see bug 26179 for a lengthy discussion of why they are there.
- The good news is, you can hide these whitespace nodes in inspector by unchecking the View > Show Whitespace Nodes menu item. Note that not all empty text nodes will be hidden. Those nodes whose
white-space CSS property value prevents the user-agent from collapsing sequences of whitespace will not be hidden.
- I'm having trouble finding a specific node in the DOM tree. Isn't there is a faster way to find it than navigating the tree?
- Sure. You can do a search via the node's name, id, or an attribute/value pair. Choose the Search > Find Nodes... menu item in an inspector window that is inspecting the document you wish to search, and enter your search criteria there.
- Or, if you do not know anything about the node, you can try and select it by clicking on it. Scroll the node into view, choose the Search > Select Element By Click menu item, and then click on the element you wish to inspect.