[Bug 25869] DOMClassList.toggle 'force' parameter is "wonky API design"

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

--- Comment #5 from Glenn Maynard <glenn@zewt.org> ---
No, it's definitely a bad, unintuitive API.  I would never expect
x.toggle(true) to mean "set x to true".  It should have been
"x.set(true/false)".  We shouldn't copy bad APIs from jQuery because we think
people will scoff at us for doing things better.

However, I don't know if it's worth the effort it would take to find out if we
can change this, and then to change it, with it already implemented in multiple
browsers.  It's probably just another ugly API that we'll have to live with.

We could add set(value) and leave toggle(value) in, but then we pay the cost of
redundant APIs, which is probably worse.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 30 May 2014 14:02:23 UTC