Got it. And one more (thanks for bearing with me): what affect does throwing an error have within a trap?
var target = { foo: function() { this.bar; console.log("after bar"); }, bar: 0 }; var proxy = new Proxy(target, { get: function(obj, name) { if (name === "bar") throw new Error("boom"); return obj[name]; } }); proxy.foo(); Does the stack unwind as with normal error handling? Does "after bar" get logged? (FF18 answers yes to the first and no to the second question.) { Kevin }
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss