Re: Typo in DOMTokenList and proposed change to classList

On Thu, 10 Dec 2009, bolinfest wrote:
>
> 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.

This appears to be fixed now.


> (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?

What's the use case?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 24 March 2010 08:55:11 UTC