May the defineProperty method of a proxy handler throw a TypeError?

Tom Van Cutsem at
Thu Aug 11 11:57:54 PDT 2011

2011/8/11 Mark S. Miller <erights at>

> On Wed, Aug 10, 2011 at 7:20 PM, Cameron McCormack <cam at> wrote:
>> On 9/08/11 9:40 AM, Mark S. Miller wrote:
>>> If there are no show-stopping legacy compat constraints forcing us to
>>> specify Reject, I prefer that we specify these to throw a TypeError.
>> I can't say for sure, but I would be surprised if this didn't cause
>> problems, given that it introduces exception throwing where currently
>> assignment to non-writable properties of objects that need to be implemented
>> as proxies (like NodeList) is just ignored.
> Ok. If we decide not to, then I think it is important that proxies be able
> to faithfully emulate ES5 failed "Reject" semantics, so that ES-next code
> can fully implement a conformant DOM.

Noted. I'll write up a small strawman to change the signature of
'defineProperty' to return a boolean success value. This change should be
fully compatible with the existing API, as the return value of the
'defineProperty' trap is currently ignored.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list