Re: [dom] Change DOMTokenList's add() return value. (#114)

> I was thinking of when you don't have to worry about browsers that return undefined.

How does that address the problem of supported token sets being added to something that doesn't have them?

I guess we could have a falsy return value for "not supported" and two different truthy ones for "supported" and "no supported set", but that just means that code written to do the truthy check will break.  If we think that at any point in the future things will transition from no supported set to having one, we really need to make it required to do an explicit tristate check for consumers.

> but that is a temporary problem, right?

Only if we think nothing else will ever transition from no supported set to supported set.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/114#issuecomment-158780091

Received on Sunday, 22 November 2015 17:34:13 UTC