An idea to extend the functionality of Proxy objects.

Oriol _ oriol-bugzilla at hotmail.com
Mon Jan 15 16:38:39 UTC 2018


The problem is enforcing the invariants. For example, if [[GetOwnProperty]] returns a non-configurable non-writable descriptor, then all future calls must also return a non-configurable non-writable descriptor with the same value. But you can't check this by just calling some traps. Instead, you need to store the property value value somewhere so that you can compare in all future calls. And the target object is the perfect place to store it.

If the invariants prevent your traps from behaving like you want, just use an extensible object with no non-configurable property as the target.

- Oriol

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180115/c407b75f/attachment.html>


More information about the es-discuss mailing list