console.dir(object)
displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.
var myObject = {
"foo":{
"bar":"data"
}
};
console.dir(myObject);
displays:
console.dirxml(object)
prints an XML representation of the descendant elements of object if possible, or the JavaScript representation if not. Calling console.dirxml()
on HTML and XML elements is equivalent to calling console.log()
.
Example 1:
console.dirxml(document)
displays:
Example 2:
console.log(document)
displays:
Example 3:
var myObject = {
"foo":{
"bar":"data"
}
};
console.dirxml(myObject);
displays: