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: David Flanagan <dflanagan@mozilla.com>
Date: Mon, 08 Aug 2011 14:20:48 -0700
Message-ID: <4E405330.2070201@mozilla.com>
To: Tom Van Cutsem <tomvc.be@gmail.com>, Cameron McCormack <cam@mcc.id.au>
CC: es-discuss <es-discuss@mozilla.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 6/20/11 1:13 AM, Tom Van Cutsem wrote 
[https://mail.mozilla.org/pipermail/es-discuss/2011-June/015352.html]:
> But my question remains: how important is it for a Proxy to be able to 
> faithfully emulate the reject behavior of assignment in non-strict 
> code? If it is important then we should probably have the 
> defineProperty trap return a success value, just like delete or set.

No one seems to have answered the question. Maybe that means it is not 
so important. The one data point I'd like to add is that WebIDL (4.7.3 
and elsewhere) is written to use the ECMA-262 Reject operation. If Proxy 
can't correctly emulate reject behavior in non-strict code, then I can't 
correctly implement the DOM in JavaScript.

On 6/17/11, Cameron McCormack wrote 
[http://lists.w3.org/Archives/Public/public-script-coord/2011AprJun/0209.html]:
> It seems like proxies should allow throwing/ignoring based on strict
> modeness of the caller.  Ill leave the requirements to Reject in there
> for now.
Since WebIDL is in last-call status, this is probably a good time to 
decide whether the proxy proposal should change to allow faithful 
emulation of Reject, or whether WebIDL should change to throw a 
TypeError instead of using Reject...

David
Received on Monday, 8 August 2011 21:21:17 UTC

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