An idea to extend the functionality of Proxy objects.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss