W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

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

From: Tom Van Cutsem <tomvc.be@gmail.com>
Date: Thu, 11 Aug 2011 20:57:54 +0200
Message-ID: <CAKDfNj9SGELmzsbFfYupHABdvE2ZWgfV_aOZg=t6juz9J_5xWQ@mail.gmail.com>
To: "Mark S. Miller" <erights@google.com>
Cc: Cameron McCormack <cam@mcc.id.au>, David Flanagan <dflanagan@mozilla.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
2011/8/11 Mark S. Miller <erights@google.com>

> On Wed, Aug 10, 2011 at 7:20 PM, Cameron McCormack <cam@mcc.id.au> 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.

Cheers,
Tom
Received on Thursday, 11 August 2011 18:58:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC