Yes, but the point is that if the property is removed, then [[HasProperty]]
will return false, and thus the invariant can't be enforced, because an exotic
object might behave like if the property was deleted under the hood.
Since you say the invariant is enforced for exotic proxy objects, you may
prefer a counterexample for these:
```js
var target = Object.preventExtensions({foo: "bar"});
var p = new Proxy(target, {
has: (target, prop) => !Reflect.deleteProperty(target, prop)
});
// Object is non-extensible
Object.isExtensible(p); // false
// foo is an observable own property
!!Object.getOwnPropertyDescriptor(p, "foo"); // true
// [[HasProperty]] returns false
"foo" in p; // false
```
-Oriol
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss