Object.freezing proxies should freeze or throw?
Claude Pache
claude.pache at gmail.com
Tue Aug 9 17:05:42 UTC 2016
> Le 9 août 2016 à 18:58, Raul-Sebastian Mihăilă <raul.mihaila at gmail.com> a écrit :
>
> Claude, I don't see how non-extensibility and deleting properties are connected.
>
The issue is not deleting per se. The issue is that a property appears to be non-existent (because successfully deleted), and later existent again, which should not be allowed on non-extensible objects.
—Claude
>
> ```js
> var target = Object.preventExtensions({ x: 1 })
> var proxy = new Proxy(target, {
> deleteProperty() { return true }
> })
>
> Object.isExtensible(proxy) // false
> delete proxy.x // true
> proxy.hasOwnProperty('x') // true
> ```
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160809/740a1eb0/attachment-0001.html>
More information about the es-discuss
mailing list