[Bug 17708] DOMTokenList: Ability to swap a class

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17708

--- Comment #7 from Anne <annevk@annevk.nl> 2012-07-08 12:07:17 UTC ---
The video might demonstrate that manipulating classList instead of className is
more efficient (would have to see the code running in several browsers to be
sure). However once you have classList you can do swap using add() and
remove(). That is probably about as efficient as a replace() method would be.
And I agree with Glenn that replace() is kind of a weird semantic for classes.
(Although I will concede that many people seem to use a replace pattern.)

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Sunday, 8 July 2012 12:07:19 UTC