has the syntax for proxies been finalized ?

André Bargull andre.bargull at udo.edu
Fri Oct 18 09:38:34 PDT 2013


> Follow up question for Tom et al...
>
> Using require('harmony-reflect')....
>
> var t = {a:3, c:4};
> var p = Proxy(
>    t,
>    {
>      get: function() {},
>      delete: function(t,x) {
>        console.log('deleting');
>        delete t.a;
>      }
>    }
> );
> delete p.c
> p; //{a:3}
> t; //{a:3}
>
> the console.log is not called and deleting is not trapped.
> Am I doing something wrong?

The trap name for the `delete` operator is "deleteProperty" instead of 
"delete"...

>
>
> @angustweets


More information about the es-discuss mailing list