May the defineProperty method of a proxy handler throw a TypeError?
David Flanagan
dflanagan at mozilla.com
Thu May 26 13:19:47 PDT 2011
On 5/26/11 10:46 AM, David Bruant wrote:
> Le 26/05/2011 18:44, David Flanagan a écrit :
>> I'd put that distinction in an abstract Proxy.Handler class and then
>> rename the current Proxy.Handler to Proxy.ForwardingHandler.
> What do you call a "class" is is a constructor with some arguments?
> Could you provide a code snippet of how you'd see it work.
All I really mean is that Proxy.Handler should be an object suitable for
use as a handler prototype. Rather than calling it Proxy.Handler, maybe
Proxy.DerivedTraps would be better. Then, using Allen's proposed <|
operator you could do:
p = Proxy.create(Proxy.DerivedTraps <| {
// fundamental traps, and optionally some derived traps defined here
});
More information about the es-discuss
mailing list