Section 2.9.3 DOMTokenList says:<br><br><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">The DOMTokenList interface represents an interface to an underlying string that consists of an <b>unordered</b> set of unique space-separated tokens.</blockquote>
<br>Yet, the item method says:<br><br><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">The item(index) method must split the underlying string on spaces, <b>sort the resulting list of tokens by Unicode code point</b>, remove exact duplicates, and then return the indexth item in this list. If index is equal to or greater than the number of tokens, then the method must return null.</blockquote>
<br>What is the reason for requiring the set to be ordered in item? It seems reasonable to say that the order of item is implementation specific but require that it is stable between changes of the class name.<div><br></div>
<div>If we still want to enforce that item returns the items in the sorted order we should change the spec to say that DOMTokenList represents an ordered set instead.<br><br><br>-- <br>erik<br><br></div>