Re: [dom] DOMTokenList#toggle: don't treat everything non-undefined as true (#64)

@mzgol The spec IDL says:

    boolean toggle(DOMString token, optional boolean force);

which means that passing undefined is the same as passing no second argument at all (your observed Firefox and IE behavior).  That's precisely for the proxying reason you describe.

The part that you link to at https://dom.spec.whatwg.org/#dom-domtokenlist-toggle will have `force` as "not passed" if `undefined` is passed to the method.  That's all handled by the IDL layer.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/64#issuecomment-135848479

Received on Friday, 28 August 2015 18:02:47 UTC