- From: Ms2ger <ms2ger@gmail.com>
 - Date: Wed, 01 Aug 2012 23:29:44 +0200
 - To: whatwg@lists.whatwg.org
 
On 08/01/2012 11:07 PM, Erik Arvidsson wrote:
> Most JS libraries has a way to add or remove a class name based on a
> boolean parameter.
>
> I'm suggesting we add a way to do this to DOMTokenList. The semantics
> would be the same as the following pure JS implementation.
>
> DOMTokenList.prototype.enable = function(name, value) {
>    value ? this.add(name) : this.remove(name);
> };
I filed <https://www.w3.org/Bugs/Public/show_bug.cgi?id=18463> to track 
this proposal.
HTH
Ms2ger
Received on Wednesday, 1 August 2012 21:30:33 UTC