You could add some workaround to have your results sorted. Please do
not take the following code as good, its just a quick hack to
attribute sorting

        var domIDs = $$("#div1, #div2, #div3"), myIDs = [], myIDs2 = [],
subKey = 'id';

        domIDs.each( function(elm, offsetID){
                myIDs.push(elm.get(subKey)+'|'+offsetID);
        });

        myIDs.sort().each( function( elm ){
                myIDs2.push( domIDs[ elm.split('|')[1] ] )
        });
// should be correct ordered by subKey now
        myIDs2.each( function( elm ){
                console.log(elm.get(subKey));
        });

Maybe this would be something for an array / object implementation
like $$('selector').attributeSort('id') ...

On 23 Mrz., 16:05, Christoph Pojer <[email protected]> wrote:
> that's how the spec for querySelector define it and we follow that :)

Reply via email to