[whatwg] DOMTokenList feedback
Sylvain Pasche
sylvain.pasche at gmail.com
Sun Jul 5 17:27:42 PDT 2009
Hi,
I'm looking at the Gecko implementation of element.classList. I had a
few comments about the spec.
1) http://html5.org/tools/web-apps-tracker?from=3253&to=3254 missed
something. There is still a mention of alphabetical sort order in the
beginning of section 2.8.3:
"element = tokenlist . item(index)
tokenlist[index]
Returns the token with index index. The tokens are sorted alphabetically."
2) contains/add/remove/toggle should mention what happens if an empty
string token is passed in the token argument. Looking at the DOM Core
exceptions, throwing a SYNTAX_ERROR seems to be the best match in this
case (if we consider an empty string as invalid):
"SYNTAX_ERR, introduced in DOM Level 2.
If an invalid or illegal string is specified."
3) case sensitivity. Would be nice to address [1].
Note that the definition of uniqueness for .length and .item() will also
need to be revisited if we want to handle classes in a case-insensitive
way in quirks mode.
Sylvain
[1]
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-June/020425.html
More information about the whatwg
mailing list