[Webkit-unassigned] [Bug 98982] Setting className attribute causes slow performance

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 5 15:03:41 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=98982





--- Comment #5 from Brad Vogel <bradavogel at gmail.com>  2012-11-05 15:05:10 PST ---
Yes, this is extremely useful. A lot of Javascript libraries implement a naive addClass() function like:
function addClass(newClass){
     element.className = element.className + ' ' + newClass;
}

If newClass already exists in element.classList, then it'll still dirty the node.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list