title: How can I log an HTML element as a JavaScript object?
body: <p>Using Google Chrome, if you <code>console.log</code> an object, it lets you inspect the element in the console. For example:</p>
  
  <pre><code>var a = { "foo" : "bar", "whiz" : "bang" };
  console.log(a);
  </code></pre>
  
  <p>This prints out <code>Object</code> which can be inspected by clicking on arrows next to it. If however I try to log an HTMLElement:</p>
  
  <pre><code>var b = goog.dom.query('html')[0];
  console.log(b);
  </code></pre>
  
  <p>This prints out <code>&lt;html&gt;&lt;/html&gt;</code> which can not be inspected by clicking on arrows next to it. If I want to see the JavaScript object (with its methods and fields) instead of just the DOM of the element, how would I do that?</p>