Question about GetBindingValue

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Aug 29 08:34:54 PDT 2014


On Aug 29, 2014, at 4:07 AM, André Bargull wrote:

> ...
> 
>> We checked with the recent ES6 draft but it seems to have the same issue.
> 
> In ES6 it's actually possible to reach that step (8.1.1.2.6 GetBindingValue, step 5), albeit it's a somewhat tricky and involves doing unusual things with proxy objects:
> 
> ,,,
> Proxy objects allow you to define your own [[HasProperty]] implementation (the "has" method in the example above). In this case [[HasProperty]] will return `true` on the first call in order to report a binding is present in HasBinding, but then will return `false` when the binding's presence is checked the second time in GetBindingValue.
> 

And in ES5, host object have similar capabilities.  I believe we put this checks in specifically to make sure everything was well defined in the presence of such host objects.

Allen

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


More information about the es-discuss mailing list