silverme / base2

Automatically exported from code.google.com/p/base2
0 stars 0 forks source link

Elements need to be sorted into document order when returned from the Selectors API #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently the matchAll/matchSingle() methods do not sort the results into
document order (according to the spec). This is not a huge problem for
base2. Most of the time developers don't care about node order. Also, this
bug only affects selectors that are grouped as a comma-separated list.

e.g. document.matchAll("body,html".item(0));

This should return <html> but returns <body>.

If the query is performed using XPath then this bug does not occur.

Original issue reported on code.google.com by dean.edw...@gmail.com on 23 Jul 2007 at 12:58

GoogleCodeExporter commented 8 years ago
This will be in the next update.

Original comment by dean.edw...@gmail.com on 30 Aug 2007 at 4:07

GoogleCodeExporter commented 8 years ago

Original comment by dean.edw...@gmail.com on 5 Dec 2007 at 4:48

GoogleCodeExporter commented 8 years ago
I've removed this feature. It is far too slow to DOM nodes on certain 
platforms. It
takes 2 seconds to sort 200 nodes on Safari.

Original comment by dean.edw...@gmail.com on 20 Dec 2007 at 2:05

GoogleCodeExporter commented 8 years ago
Node lists are now sorted as per spec.

Original comment by dean.edw...@gmail.com on 22 Sep 2008 at 2:31