Proxy questions

Kevin Smith khs4473 at
Sun Jan 20 12:38:02 PST 2013

> Before commenting on the general question, I'm confused about
> something in your code. How did a proxy get bound to "this" in your
> example?

This is what I was thinking:

    var blackHole = new Purse();

    var blackHole = new Proxy(blackHolePurse, {

        get: function(obj, name) {

            if (name === "somethingInocuous") throw new Error("Up in
            return obj[name];

    blackHole.deposit(1000, myPurse);

It's a pretty silly "attack", obviously : )  Apparently I'm not very good
at being evil.

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list