Opened 13 years ago

Closed 10 years ago

#9191 closed enhancement (patchwelcome)

dojo.query - optionally return results in correct DOM order

Reported by: mojowww Owned by: dylan
Priority: low Milestone: future
Component: Query Version: 1.3.0
Keywords: query Cc:
Blocked By: Blocking:


I have heard we don't want to have the query return the elements in order of the DOM because it would be a big performance hit, which totally makes sense.

Would it be possible to have an optional parameter, or maybe an entirely new function in dojo that *would* return them in the right order?

Example implementations:

//overloaded the query method
dojo.guery(".foo", document, true); 

// new method
dojo.dom(".foo", document);

Note: I confirmed that the built in FF getElementsByClassName returns results in order.

Change History (7)

comment:1 Changed 13 years ago by Adam Peller

Owner: changed from anonymous to alex

comment:2 Changed 13 years ago by bill

Component: GeneralQuery

comment:3 Changed 13 years ago by bill

Milestone: tbdfuture

comment:4 Changed 13 years ago by Les

jQuery 1.3.2 forces document order for comma-separated queries:

comment:5 Changed 11 years ago by Chris Mitchell

Owner: changed from alex to dylan

please review/triage

comment:6 Changed 10 years ago by ben hockey

#8223 is a duplicate of this ticket.

comment:7 Changed 10 years ago by ben hockey

Priority: highlow
Resolution: patchwelcome
Status: newclosed

Given that this has been bumped a number of times without any action, I'm going to close this ticket but would welcome any patches.

Note: See TracTickets for help on using tickets.