Re: [whatwg/dom] Future for unique tokens in DOMTokenList (#201)

This is what I get in Safari Tech Preview for this test case:
```js
var el = document.createElement("div");

el.className = " a a b ";
console.log(el.className.length); // 7
console.log(el.classList.length); // 2
console.log(Array.prototype.slice.call(el.classList).join(" ")); // "a b"

el.classList.add("a"); // should remove duplicate and white space in associated attr value

console.log(el.className.length); // 3
console.log(el.classList.length); // 2
console.log(Array.prototype.slice.call(el.classList).join(" ")); // "a b"

el.classList.remove("a");

console.log(el.className.length); // 1
console.log(el.classList.length); // 1
console.log(Array.prototype.slice.call(el.classList).join(" ")); // "b"
```

So it seems to be serializing very aggressively.

---
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/201#issuecomment-206321585

Received on Wednesday, 6 April 2016 11:28:27 UTC