W3C home > Mailing lists > Public > public-html@w3.org > May 2008

Re: DOMTokenList.add() when the underlying string is empty (detailed review of the DOM)

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 12 May 2008 09:41:40 +0000 (UTC)
To: Simon Pieters <simonp@opera.com>
Cc: public-html <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0805120941330.22257@hixie.dreamhostps.com>

On Tue, 17 Jul 2007, Simon Pieters wrote:
> 
> The spec says about DOMTokenList.add():
> 
>   4. Otherwise, if the last character of the DOMTokenList object's
>      underlying string is not a space character, then append a U+0020
>      SPACE character to the end of that string.
> 
> When the underlying string is empty, the last character is not a space 
> character, and so a space will be appended, resulting in the string " x" 
> if "x" was used as parameter. Is this intentional? I wouldn't expect a 
> space to be appended when the underlying string is empty.

Fixed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 12 May 2008 09:42:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:17 GMT