Andrew Clavin Andrew Clavin - 3 months ago 11
HTML Question

Chrome console accessing DOM

When i put in my chrome console something like:

document.getElementById('scroller')


I get back something like:

<div class="blah" id="scroller>...</div>


But if i pause a script and throw in a watch by the same expression I'll get javascript object, how do I get the javascript object in the regular console like:

document.getElementById('scroller'): div#scroller.multipleFiles
accessKey: ""
align: ""
attributes : NamedNodeMap
baseURI : "http://localhost:3000/cards.html#card-text-download-cycler"
childElementCount: 12
childNodes: NodeList[25]
...

Answer
console.dir(document.getElementById('scroller'))