This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Current DOMTokenList spec lets add/remove methods to be passed multiple classes. However, the toggle method didn't get such a possibility due to the second boolean optional parameter. This is inconsequent and limiting. I propose to change the signature to: boolean toggle(DOMString... tokens, optional boolean force); The change would mean that the `force` parameter is not necessarily the second one but the last one on the list of parameters, e.g. in JavaScript the `force` parameter would be equal to: arguments[arguments.length - 1] within the function body. Not adding such support would still require libraries like jQuery to patch the classList.toggle method to fulfill its semantics of being able to accept multiple classes.
https://github.com/w3c/dom/issues/7 (It's actually a DOM issue)