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

In short word (when reading spec) it it looks like:
- tokens (from `DOMTokenList`) are synchronized with associated attr, so if we change first of them then we should get effect on second (and vice versa). But `DOMTokenList` should trim whitespace, eliminate repeated token, and eliminate repeated whitespace. So it's normal that in some cases value in associated attr may differ from what is expressed by `DOMTokenList`. But using method like `add/remove/replace/toggle` (even when no passing any argument) should automatically update its associated attr value and clean it (remove duplicate token, white space, etc.)
- stringifire for `DOMTokenList is` the same as directly using `DOMTokenList.value` getter, so we should get associated attr's value. It's sad, better if we get serialized `DOMTokenList` (https://dom.spec.whatwg.org/#concept-ordered-set-serializer) because in DOM there is no any command to do this, so we must use other solution from ES, but if all browsers work like that so it's can be accept. 

So if Safari Technical Preview works as I describe above then I have to congratulate, finally we have some progress here. You can check some of this test:
https://github.com/whatwg/dom/issues/201#issue-145004189
https://github.com/whatwg/dom/issues/91#issue-111958217
https://github.com/whatwg/dom/issues/81#issuecomment-148913547
https://github.com/whatwg/dom/issues/81#issuecomment-149927265

---
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-206318978

Received on Wednesday, 6 April 2016 11:21:36 UTC