Opened 13 years ago
Closed 13 years ago
#10074 closed enhancement (wontfix)
NodeList-traverse why first() and last() return NodeList?
Reported by: | Les | Owned by: | anonymous |
---|---|---|---|
Priority: | low | Milestone: | tbd |
Component: | General | Version: | 1.3.2 |
Keywords: | NodeList-traverse | Cc: | James Burke |
Blocked By: | Blocking: |
Description
I was expecting first() or last() would return the node, not a NodeList?.
Note: See
TracTickets for help on using
tickets.
first, last, odd and even are meant as replacement calls for the type of group pseudo selectors you can do in jquery but not dojo. So, in jquery, you could do $("form:last"), in dojo, you can do dojo.query("form").last().
Ideally we could get those group pseudo selector support into the dojo query engine, but this is a stop-gap until then. As with methods like .at(), we return a dojo.NodeList? for the calls, not single nodes, so normal chaining will work.