W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] DOMTokenList and whitespace

From: Sylvain Pasche <sylvain.pasche@gmail.com>
Date: Mon, 20 Jul 2009 23:04:41 +0200
Message-ID: <f057af470907201404k3287ba17t2a8c2f9e6aa7e35d@mail.gmail.com>

1) What's the reason for preserving whitespace when a DOMTokenList
method is changing the attribute?

2) If preserving whitespace is not important, what about normalizing
whitespace during mutation?

By normalizing whitespace, I mean splitting tokens (keeping unique
ones), doing the DOMTokenList add/remove/toggle operation, and joining
tokens together separated by a whitespace.

I've already implemented the current spec algorithm in Mozilla [1],
but normalizing whitespace should simplify things a bit. It would be
interesting to have other implementor's opinion on this.

(Note: this was previously raised in [2], but it should have been a new thread.)


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=501257
[2] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-July/021018.html
Received on Monday, 20 July 2009 14:04:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:14 UTC