niche Posted September 6, 2011 Share Posted September 6, 2011 Since document.body = document.getElementsByTagName('body')[0] can everything in the DOM be turned into an array? If so how? Link to comment Share on other sites More sharing options...
Ingolme Posted September 6, 2011 Share Posted September 6, 2011 It's not an array, it's a nodelist. The difference being that you cannot use array methods on a nodelist. Some HTML node methods return node lists. Link to comment Share on other sites More sharing options...
niche Posted September 6, 2011 Author Share Posted September 6, 2011 Thanks. How do you do you get a dump of the nodelist? Link to comment Share on other sites More sharing options...
thescientist Posted September 6, 2011 Share Posted September 6, 2011 I use Chrome, and just log everything to the console, while having the developers tool window open and on the console tab. It will also work in other browsers, except for IE, where you have to define console globally first. console.log('stuff here'); Link to comment Share on other sites More sharing options...
niche Posted September 6, 2011 Author Share Posted September 6, 2011 How would you do that with firebug. I've only used the html tab. Link to comment Share on other sites More sharing options...
jeffman Posted September 6, 2011 Share Posted September 6, 2011 Would the DOM Inspector add-on be more helpful? I use it all the time. Link to comment Share on other sites More sharing options...
thescientist Posted September 6, 2011 Share Posted September 6, 2011 I like the elements tab for inspecting the structure and CSS. but to log my work and inspect the state of my application, I like to use the console. To be honest, since I've started using Chrome, I've never looked back to FF. But yes, for FF, as DD suggested, the DOM Inspector would work well. Link to comment Share on other sites More sharing options...
niche Posted September 6, 2011 Author Share Posted September 6, 2011 Thanks for your help Ingolme, thescientist, and Deirdre's Dad. I'm learning what I need to know. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.