On 22 Aug, 2008, at 8:04 AM, Allen Wirfs-Brock wrote:
> Jeff Watkins <[EMAIL PROTECTED]> said:
>> because I'd love to see a delete added to get and set for properties.
>
> Don't quite understand what you are asking for here?
I can already define a getter and a setter for properties, I'd like to
be able to specify a deleter. Using the syntax proposed the other day
(which I really like):
var o= {
get foo: function()
{
// ...
},
set foo: function(newFoo)
{
// ...
},
delete foo: function()
{
// ...
}
};
I can think of a couple situations where this would be nice,
specifically around creating proxies for other objects. The only
drawback is that 'foo' in o always returns true.
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss