[whatwg] DOMTokenList is unordered but yet requires sorting

Erik Arvidsson erik.arvidsson at gmail.com
Mon May 18 09:36:52 PDT 2009

On Mon, May 18, 2009 at 00:18, Simon Pieters <simonp at opera.com> wrote:
> Immagine if it is specified that the order is not relevant and
> implementations can use any order (so long as it's stable). So one UA uses
> one order and another uses another. Then one of those UAs becomes very
> popular. Web pages start to depend on the order of the popular UA (e.g. they
> use the first item and expect it to be the "right" one). Now those pages
> don't work in the less popular UA and that UA vendor has to reverse engineer
> the popular UA and implement the same order.
> The above has happened with the DOM Core .attributes attribute, IIRC.

It also happened to for in order for JS objects.

Simon, I think you have convinced me at least. I therefore think that
a better wording in the spec is to say that DOMTokenList acts as a
sorted set.


More information about the whatwg mailing list