[Bug 13999] DOMTokenList (e.g., element.classList): allow to add/remove multiple tokens at once

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13999

--- Comment #4 from Tab Atkins Jr. <jackalmage@gmail.com> 2011-09-01 21:26:40 UTC ---
Whoops, you're right.  jQuery *does* allow multiple classes.  I was misled by a
quick skim.

(In reply to comment #3)
> (In reply to comment #1)
> 
> > The performance of classList is an implementation detail.  There's no
> > particular reason for it to be slower.
> 
> One of major reasons is that consequent adding classes one by one causes
> multiple rendering-reflows. (Each reflow is quite time-expensive operation.)
> 
> Opposite to this, adding multiple classes at once causes only one reflow.

I agree with the reasoning; I was just looking for precedent for good ways to
do it.

-- 
Configure bugmail: http://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 Thursday, 1 September 2011 21:26:47 UTC