- From: Domenic Denicola <domenic@domenicdenicola.com>
- Date: Tue, 6 Aug 2013 15:50:19 +0000
- To: Anne van Kesteren <annevk@annevk.nl>, Allen Wirfs-Brock <allen@wirfs-brock.com>
- CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
Right, I think both are indeed enums at some conceptual level. IDL gives that concept a name; ES does not. It would be nice if IDL enums followed ES semantics, of doing `ToString(value)` (which may throw a `TypeError`) and then throwing a `RangeError` if outside the allowed range. However, the [definition of `RangeError`][1] probably needs some updating in that case: > Indicates a numeric value has exceeded the allowable range. [1]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.11.5.2
Received on Tuesday, 6 August 2013 15:50:57 UTC