Re: [whatwg/dom] Spec for DOMTokenList stringifier disagrees with every single implementation (#105)

Test for current behavior: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4418  Tested in Edge 25.10586, Firefox 50.0a2, Chrome 52:

* None of the browsers ever condenses duplicates, and none touches the attribute if no actual change is to be made (i.e., removing a token that's not present or adding one that already is).
* When adding a token that isn't already in the list, Edge normalizes whitespace, while Firefox and Chrome do not.
* When removing a token that is in the list, Edge and Chrome normalize whitespace, while Firefox does not.

So we should certainly spec that any change to the list normalizes whitespace, since that's not interoperable now anyway.  As far as the rest of what's in the spec, I don't know.  I think it would be easier to implement the current spec than the previous spec, because duplicate-checking is potentially expensive and might need less optimization if it's only from method calls.

I think we're still blocked here on hearing what Edge has to say.

@ArkadiuszMichalski We aren't arguing so much about what makes sense or is convenient.  We're arguing about whether it's worth it to change the spec where we already have interop.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/105#issuecomment-242969392

Received on Sunday, 28 August 2016 11:21:42 UTC