Given an ordered set (like JS's Set or DOM's classList) containing (a, b, c), what should set.replace(a, c) give?
-
-
Asking for a replace() method on an ordered set and thus opening up mind-bending edge cases like https://twitter.com/domenic/status/855103294900981761 … :P
-
Can we get one that replaces all at once (and removes old)? So we don't have to do diffing in user space - and also avoids these scenarios.
-
I don't understand this ask.
-
Something like: element.classList = new DOMTokenList('c', 'b');
-
Just do elem.classList = 'c b'
-
So many string. So little interning.
-
As usual, show data that this is actually a real world problem, then we can talk solving it.
-
Seems a higher bar than what introduced .replace() :P I'd rather focus on `http://elem.style = stylePropertyMap;` Alts. proven slow.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.