Opened 10 years ago

Closed 9 years ago

#10036 closed enhancement (fixed)

[patch][cla] NodeList.at() allow negative indexes

Reported by: Les Owned by: dante
Priority: high Milestone: 1.5
Component: General Version: 1.3.2
Keywords: dojo.NodeList-traverse Cc:
Blocked By: Blocking:

Description

NodeList?.at() is very flexible, e.g. it allows listing indexes like this:

dojo.query('form').children().at(2,1,0,0);

It would be nice to allow negative indexes, e.g.

dojo.query('form').children().at(0,-1);
dojo.query('form').children(0,-1); // <- this also would be nice
dojo.query('form').children().filter(0,-1);

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by James Burke

Milestone: tbdfuture

Pushing all enhancements to future, since we are close to locking down 1.4 beta.

comment:2 Changed 9 years ago by dante

Milestone: future1.5
Owner: changed from anonymous to dante
Status: newassigned

patch is attached to #10468 ... sorry I didn't notice this ticket.

Changed 9 years ago by dante

Attachment: NodeList.patch added

comment:3 Changed 9 years ago by dante

Summary: NodeList.at() allow negative indexes[patch][cla] NodeList.at() allow negative indexes

comment:4 Changed 9 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [21802]) fixes #10036 - make .at() allow negative indices with test and extended docs

Note: See TracTickets for help on using tickets.