[whatwg] DOMTokenList and whitespace

Sylvain Pasche sylvain.pasche at gmail.com
Mon Jul 20 14:04:41 PDT 2009


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



More information about the whatwg mailing list