[whatwg] DOMTokenList is unordered but yet requires sorting

Kristof Zelechovski giecrilj at stegny.2a.pl
Mon May 18 11:21:34 PDT 2009


DOMTokenList, as an object, is semantically unordered, therefore an
arbitrary ordering can be used for enumeration.  The item method of
DOMTokenList provides an enumerator and imposes such an ordering.
Since no other enumerator is available to counter the claim, it may be
tempting to say, as a simplification, that DOMTokenList itself is ordered.
I would rather discourage you from putting it that way though because it
precludes inventing another enumerator in the future or as an extension.
HTH,
Chris



More information about the whatwg mailing list