[whatwg] DOMTokenList and whitespace

Hi,

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.)

Sylvain


[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