Re: [selectors api] Why two methods?

* Anne van Kesteren wrote:
>On Thu, 25 Jan 2007 15:04:52 -0500, David Håsäther <hasather@gmail.com>  
>wrote:
>> Yes, but grabbing the first node has its own method. Grabbing the second  
>> or last does not. What I don't understand is _why_ there is a special  
>> method for grabbing the first node? I just don't think that is a common  
>> thing to do, and as Jim said, those nodes usually have an id.
>
>It's not about getting the first node, as demonstrated. It's about getting  
>a single node.

The single element method returns the first node in document order that
matches the selector. That's the "first" David is talking about. You are
talking about the "first" child of an element.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Saturday, 27 January 2007 23:18:56 UTC