Initially posted on github (https://github.com/tc39/ecma262/issues/652),
but I think the mailing list is more appropriate.
Usually methods on Object that change some internal state of the
objects/properties of the objects either succeed or throw. However,
Object.freeze can fail to freeze proxies without throwing:
```js
const target = Object.seal({x: 2});
const proxy = new Proxy(target, {
defineProperty() {
return true;
},
set(target, prop, value) {
target[prop] = value;
}
});
Object.freeze(proxy);
console.log(proxy.x); // 2
proxy.x = 100;
console.log(proxy.x); // 100
```
Should this be allowed?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss