[Bug 23712] New: DOMTokenList needs a way to conditionally set or remove

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23712

            Bug ID: 23712
           Summary: DOMTokenList needs a way to conditionally set or
                    remove
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: annevk@annevk.nl
          Reporter: ian@hixie.ch
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org

http://dom.spec.whatwg.org/#interface-domtokenlist

It'd be nice if we could change this:

  if (foo != e.classList.has('foo'))
     e.classList.toggle('foo');

...to:

   e.classList.set('foo', foo);

...or some such.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Monday, 4 November 2013 00:55:44 UTC