Closed gregglind closed 8 years ago
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
// throws in strict mode
var A = Object.preventExtensions({data: 1});
var handler = { get: function (target, name) { if (name in target) { return target[name] } else { throw new Error("oh no")}}};
var p = new Proxy(A, handler)
p.wut // throws
For now at least, not going to make the 'data' into a smart object. Too 'weird'.
r+, everything looks good to me, tested locally
In a previous code this is this TODO:
proxy so that Lstore saves on changes to Data. I wonder about that and how far down the rabbit hole to go.