W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > September 2011

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

From: <bugzilla@jessica.w3.org>
Date: Thu, 01 Sep 2011 21:26:40 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QzEmW-0004oc-Vs@jessica.w3.org>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:31:18 UTC