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 
> 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 
> 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...

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:04 UTC