[Javascript] Listing Images on current page

Hassan Schroeder hassan at webtuitive.com
Thu Sep 6 10:24:54 CDT 2007


David Dorward wrote:

> If you had 'img' then you would have a collection of the image  
> elements, not an array.

? Technically you'd have a NodeList, about which the W3C says:

Interface NodeList

     The NodeList interface provides the abstraction of an ordered
     collection of nodes, without defining or constraining how this
     collection is implemented.

     The items in the NodeList are accessible via an integral index,
     starting from 0.

Which in a JS context sounds pretty array-ish-like to me. I mean,
a rose by any other name... :-)

But can you explain why (and how) you're distinguishing the two?

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                            dream.  code.




More information about the Javascript mailing list