Typo in DOMTokenList and proposed change to classList

In the proposed spec for DOMTokenList:

http://dev.w3.org/html5/spec/Overview.html#domtokenlist

(1) I think this is just a mistake, but in the green box where toggle is
defined, it does not mention its return value. Since both the IDL and
implementation for toggle mention the return value, I suspect this is
supposed to be there as the other return values are listed.

(2) Neither add() nor remove() are specified to have a return value. I
suspect that this is deliberate (if so, I was curious as to why), but I was
hoping that that could be changed. In writing up a detailed description of
the goog.dom.classes library in Closure:

http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/dom/classes.js

I started out by saying that goog.dom.classes.add and
goog.dom.classes.remove would be able to be reimplemented with classList
when it becomes available, but I just realized that is not true because the
Closure functions support a return value and classList does not (at least,
not according to the current draft for the spec).

Is there any reason why toggle() is going to support a return value but
add() and remove() will not?

Thanks,
Michael

-- 
View this message in context: http://old.nabble.com/Typo-in-DOMTokenList-and-proposed-change-to-classList-tp26738997p26738997.html
Sent from the w3.org - public-html-comments mailing list archive at Nabble.com.

Received on Friday, 11 December 2009 09:14:08 UTC