- From: Rick Waldron <waldron.rick@gmail.com>
- Date: Sat, 1 Dec 2012 14:06:01 -0500
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Alexandre Morgaut <Alexandre.Morgaut@4d.com>, WHATWG <whatwg@whatwg.org>
On Fri, Nov 30, 2012 at 1:29 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote: > On Fri, Nov 30, 2012 at 10:02 AM, Alexandre Morgaut > <Alexandre.Morgaut@4d.com> wrote: > >> Only feedback left is the return types of set(), append(), and delete(). > > > > Maybe remove() would be better than delete() as delete is a reserved JS > keyword ;-) > > Nope, it's contextually reserved. You can use in places like a method > name without a problem. > Correct. For some background: the specification[0] rules that Identifiers are IdentifierNames that are not a ReservedWord. A ReservedWord itself is an IdentifierName that cannot be an Identifier; PropertyName is an IdentifierName so it gets the same treatment, eg. var o = { function: function() { return true; } }; o.function(); // true I just checked and no browser's latest stable release has the bug that would cause an exception to be thrown when a ReservedWord was used as a PropertyName (which is great, because the last time I checked for this, Safari 5.0.? did throw) Rick [0] http://es5.github.com/#x7.6 > > ~TJ >
Received on Saturday, 1 December 2012 20:39:17 UTC