Re: Figuring out easier readonly interfaces

On Oct 2, 2013, at 2:25 PM, Tab Atkins Jr. wrote:

> On Wed, Oct 2, 2013 at 2:17 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> On 10/2/13 5:10 PM, Tab Atkins Jr. wrote:
>>> From what I can tell, the easiest way to do this is to use a Proxy
>>> around the mutable instance, which intercepts the "set" and
>>> "deleteProperty" traps (and maybe "defineProperty"?) and cancels them,
>>> and forwards the rest of the traps.
>> 
>> So directly .apply()-ing a setter gotten off the prototype would still
>> mutate the object?
> 
> I don't think so, but I could be wrong.  I think that still ends up
> trying to do a "set" on the proxy, which'll get intercepted and
> cancelled.  It just takes a more circuitous route to get there.
> 
> (I can't find the Proxy definitions in the latest HTML version of the

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-9.3 

> ES spec, so I'm going on the most recent wiki page defining this stuff
> for now.  Publishing
Working draft
> specs as Word documents continues to be
> ridiculous.)
It's not clear how that relates to your inability to find the Prxoy material in the available HTML-based draft

Final ECMAScript standards are published in PDF and HTML.

Received on Wednesday, 2 October 2013 22:37:36 UTC