Let me correct a typo in that last one:
var blackHolePurse = new Purse();
var blackHole = new Proxy(blackHolePurse, {
get: function(obj, name) {
if (name === "somethingInocuous") throw new Error("Up in
smoke!");
return obj[name];
}
});
try { blackHole.deposit(1000, myPurse); }
catch (x) { /* Oops - $1000 just disappeared from existence. */ }
Again - more foolish than evil. : )
{ Kevin }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss