Opened 12 years ago

Closed 12 years ago

#10704 closed defect (duplicate)

[patch][cla] Make accept negative index

Reported by: dante Owned by: dante
Priority: high Milestone: 1.5
Component: Core Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:


Currently, you can only specify a positive index for an at() call. It would be nice if you were able to pass a negative, which looped around backwards from 0 ...


dojo.query("a").at(0, -1) // first and last elements

requires a one-line addition to NodeList?.js, patch attached.

(apologies if this is a dup, I thought I'd filed this ticket previously but cannot locate it now)

Attachments (1)

NodeList.patch (1.3 KB) - added by dante 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by dante

Attachment: NodeList.patch added

comment:1 Changed 12 years ago by dante

Summary: Make accept negative index[patch][cla] Make accept negative index

comment:2 Changed 12 years ago by dante

(In [21681]) refs #10704 - updating unit test to pass at() when firebug present, who is now adding a <div> to <html> for firebugConsole. scope the selection a tad

comment:3 Changed 12 years ago by dante

Resolution: duplicate
Status: newclosed

this was a duplicate that was fixed with [21802]

Note: See TracTickets for help on using tickets.