Inspect

From FirebugWiki

Jump to: navigation, search

Inspects an object in the most suitable panel, or the panel identified by the optional argument panelName.

Contents

[edit] Syntax

inspect(object[, panelName])

[edit] Parameters

[edit] object

The object to inspect. (required)

[edit] panelName

Name of the panel to inspect the object in. (optional)

The available panel names integrated into Firebug are html, stylesheet, script, dom, net and cookies. (Though the Net Panel and the Cookies Panel currently don't support inspecting).

If the panel name is not given, the most appropriate panel will be chosen.

[edit] Examples

inspect(document)

Inspects the document property inside the DOM Panel.

inspect(document.body.firstElementChild)

Inspects the first element child of the <body> tag inside the HTML Panel.

inspect(document.styleSheets[0].cssRules[9])

Inspects the 10th rule of the first CSS stylesheet inside the CSS Panel.

inspect(myFunction, "script")

Inspects the function myFunction inside the Script Panel. If the second parameter wouldn't be specified, the function would be inspected inside the DOM Panel.

[edit] See also

Personal tools