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

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.