W3C home > Mailing lists > Public > public-html-comments@w3.org > March 2010

Re: Typo in DOMTokenList and proposed change to classList

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 24 Mar 2010 08:54:43 +0000 (UTC)
To: bolinfest <bolinfest@gmail.com>
Cc: public-html-comments@w3.org
Message-ID: <Pine.LNX.4.64.1003240854280.29348@ps20323.dreamhostps.com>
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:26 UTC