Console.dir

From FirebugWiki
Revision as of 17:10, 21 November 2013 by Sebastianz (Talk | contribs) (Added categories)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Prints an interactive listing of all properties of the object.

This looks identical to the view that inside the DOM Panel and also shares the display options with it. I.e. if you have unchecked Show DOM functions for example, they also won't be shown in the output of this command.

Syntax[edit]

console.dir(object)

Parameters[edit]

object[edit]

Object to display the properties for. (required)

Examples[edit]

console.dir(document.body)

Lists all properties of the <body> element.

console.dir(userDefinedProperty)

Lists all properties of the userDefinedProperty variable.

See also[edit]