Bug 99375

Summary: Add force parameter to DOMTokenList.toggle
Product: WebKit Reporter: Pablo Flouret <pf>
Component: DOMAssignee: Pablo Flouret <pf>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, arv, eric, ojan, webkit.review.bot
Priority: P2 Keywords: WebExposed
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Pablo Flouret
Reported 2012-10-15 15:47:40 PDT
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.
Attachments
Patch (8.47 KB, patch)
2012-10-15 16:08 PDT, Pablo Flouret
no flags
Pablo Flouret
Comment 1 2012-10-15 16:08:21 PDT
Darin Adler
Comment 2 2012-10-15 20:39:45 PDT
Comment on attachment 168797 [details] Patch 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.
WebKit Review Bot
Comment 3 2012-10-15 20:57:05 PDT
Comment on attachment 168797 [details] Patch Clearing flags on attachment: 168797 Committed r131408: <http://trac.webkit.org/changeset/131408>
WebKit Review Bot
Comment 4 2012-10-15 20:57:09 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.