[Webkit-unassigned] [Bug 111307] div.classList.add('a', 'a') creates duplicate entries

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 8 18:43:50 PDT 2013


Andrea Giammarchi <andrea.giammarchi at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |andrea.giammarchi at gmail.com

--- Comment #5 from Andrea Giammarchi <andrea.giammarchi at gmail.com>  2013-10-08 18:42:41 PST ---
confirmed and fixed/verified through the test 74 in here: http://webreflection.github.io/dom4/test/

The check is basically this one:

div.classList.add('a', 'b', 'a');
assert(div.className === 'a b');

the test against to verify it works is the one showed here:
div.classList.add('a', 'a');
assert(div.className === 'a');

Very weird this bus hasn't been confirmed yet since it's clearly stated about being unique tokens.

What would be the reason to have twice the same class otherwise, having an `!important` effect ?

Thanks for fixing this, I don't really want to rely on JS to fix such simple CSS classList core gotcha.

Best Regards

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