OpenSource For You

Inspecting a document

-

When the DOM inspector opens, it may or may not load an associated document, depending on the host applicatio­n. If it doesn’t automatica­lly load a document or loads a document other than the one you’d like to inspect, you can select the desired document in a few different ways.

There are three ways of inspecting any document, which are described below.

Inspecting content documents: The Inspect Content Document menu popup can be accessed from the File menu, and it will list the currently loaded content documents. In the Firefox and Sea Monkey browsers, these will be the Web pages you have opened in tabs. For Thunderbir­d and Sea Monkey Mail and News, any messages you’re viewing will be listed here.

Inspecting Chrome documents: The Inspect Chrome Document menu popup can be accessed from the File menu, and it will contain the list of currently loaded Chrome windows and sub-documents. A browser window and the DOM inspector are likely to already be open and displayed in this list. The DOM inspector keeps track of all the windows that are open, so to inspect the DOM of a particular window in the DOM inspector, simply access that window as you would normally do and then choose its title from this dynamicall­y updated menu list.

Inspecting arbitrary URLs: We can also inspect the DOM of arbitrary URLs by using the Inspect a URL menu item in the File menu, or by just entering a URL into the DOM inspector’s address bar and clicking Inspect or pressing Enter. We should not use this approach to inspect Chrome documents, but instead ensure that the Chrome document loads normally, and use the Inspect Chrome Document menu popup to inspect the document.

When you inspect a Web page by this method, a browser pane at the bottom of the DOM inspector window will open up, displaying the Web page. This allows you to use the DOM inspector without having to use a separate browser window, or without embedding a browser in your applicatio­n at all. If you find that the browser pane takes up too much space, you may close it, but you will not be able to visually observe any of the consequenc­es of your actions.

Newspapers in English

Newspapers from India