Angus Croll (2013-10-18T15:06:07.000Z)
I can confirm:

npm install harmony-reflect
node --harmony
> require('harmony-reflect')

and I'm good to go with ES6 proxy syntax

thanks all!

@angustweets


On Fri, Oct 18, 2013 at 7:49 AM, Angus Croll <anguscroll at gmail.com> wrote:

> Great info thanks (and Tom and Domenic)
>
> A note on MDN confirming that direct proxy adhered to the new spec (and a
> similar one on old proxy saying it didn't) would probably be immensely
> helpful to other people who had the same question I had.
>
> Also (to all) deleting or marking as obsolete all wiki-harmony docs that
> no longer meet the standard would save a lot of wasted hours
>
> thanks!
>
>
>
>
>
> On Oct 18, 2013, at 6:17, David Bruant <bruant.d at gmail.com> wrote:
>
> Le 18/10/2013 07:19, Angus Croll a écrit :
>
>  I couldn't find a commitment to a specific syntax in the latest ES6
> standard
>
> The latest official news is in the May 2013 TC39 notes:
>
> https://github.com/rwaldron/tc39-notes/blob/master/es6/2013-05/may-21.md#44-proxies
> The final design of proxies is the "direct proxies" design. As Tom said, a
> proxy is now created doing:
>     var p = Proxy(target, handler)
>
> Proxy.create and Proxy.createFunction are aimed at disappearing.
>
>  Gecko, chrome experimental, traceur and 'node --harmony-proxies' support
> the Proxy.create syntax (detailed in
> http://wiki.ecmascript.org/doku.php?id=harmony:proxies)
>
>  e.g.
>  var proxy = Proxy.create({
>  get: function(p, n) {
>   return 'Hello ' + n;
>  }
> });
> proxy.World //'Hello World'
>
> On the SpiderMonkey (Gecko implements the DOM and other platform APIs and
> SpiderMonkey is the part that implement ECMAScript) side, I filed a bug to
> get rid of these as it's indeed confusing to have both APIs exposed in web
> pages:
> https://bugzilla.mozilla.org/show_bug.cgi?id=892903
>
> IIRC, the V8 team had started implementing something (behind a flag), and
> then wars on Proxy design happened, so they chose to wait for the design to
> stabilize. Now may be a good time to restart
>
>   However MDN calls the above the 'Old Proxy API'.
>
> I'm glad I succeeded in, at least, making people wonder what that was all
> about :-)
>
> Since I've been following closely the design of proxies, I documented them
> on MDN. Especially after the implementation of direct proxies in Firefox
> (where I moved the documentation of the previous API to its own page and
> try to explain the best I could that people should not use it). I'm happy
> to improve the doc if something isn't clear (on the feature itself or
> clarify the current technico-social mess of different APIs in the wild).
>
> As a side note, to my knowledge, the only native implementation of direct
> proxies is in Firefox, but it's incomplete and has known bugs. You can see
> the known limitations and bugs here:
> https://bugzilla.mozilla.org/showdependencytree.cgi?id=703537&hide_resolved=1("depends on" section. Bug 787710 is particularly funny :-)).
>
> If you want to play with proxies, I think that the most
> faithful-to-the-spec implementation is Tom's polyfill:
> https://github.com/tvcutsem/harmony-reflect/blob/master/reflect.js where
> he's using the old API where available to implement the new one.
>
> David
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131018/67a8c75b/attachment.html>
domenic at domenicdenicola.com (2013-10-26T03:13:22.750Z)
I can confirm:

```
npm install harmony-reflect
node --harmony
> require('harmony-reflect')
```

and I'm good to go with ES6 proxy syntax

thanks all!