Bug 99375 - Add force parameter to DOMTokenList.toggle
: Add force parameter to DOMTokenList.toggle
Status: RESOLVED FIXED
: WebKit
HTML DOM
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
: WebExposed
:
:
  Show dependency treegraph
 
Reported: 2012-10-15 15:47 PST by
Modified: 2012-10-15 20:57 PST (History)


Attachments
Patch (8.47 KB, patch)
2012-10-15 16:08 PST, Pablo Flouret
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-10-15 15:47:40 PST
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18463

The optional boolean force parameter, if present, basically makes toggle always add or remove a class.
------- Comment #1 From 2012-10-15 16:08:21 PST -------
Created an attachment (id=168797) [details]
Patch
------- Comment #2 From 2012-10-15 20:39:45 PST -------
(From update of attachment 168797 [details])
Code change looks fine. Test cases are not nearly extensive enough. We should do the toggle version of all the add and remove tests, plus we need to check the behavior when the argument is a non-boolean JavaScript value such as the numbers 0 and 1, null, undefined, or a string.
------- Comment #3 From 2012-10-15 20:57:05 PST -------
(From update of attachment 168797 [details])
Clearing flags on attachment: 168797

Committed r131408: <http://trac.webkit.org/changeset/131408>
------- Comment #4 From 2012-10-15 20:57:09 PST -------
All reviewed patches have been landed.  Closing bug.