[dom] Let DOMTokenList.prototype.add() return false if there are no supported tokens (#111)

This is to deal with an issue raised on blink-dev, discussed briefly on IRC:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/xEoWkGEd_g4/ybkKf0GyAwAJ
http://krijnhoetmer.nl/irc-logs/whatwg/20151120#l-239

To summarize, it would be really bad if an attribute that currently isn't defined in terms of supported tokens is later "upgraded" to something like the rel attribute. Then it would be harder to reliably detect that a token is *really* supported, one might have to resort to e.g. `supported = !list.add('tokenthatwillneverbesupported') && list.add('tokentotest')` plus `list.remove('tokenthatwillneverbesupported')` as cleanup.

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

Received on Friday, 20 November 2015 10:40:12 UTC