Interesting bug, thanks for the info.

In such case the only concern would be why `Object.prototype` is considered
but not inherited properties too.

If inheritance should be considered, I'd rather go like this:

```
var NoSuchProperty = Proxy({}, {
  get: function(target, name, receiver) {
    while (target = Object.getPrototypeOf(target)) {
      if (name in target) {
        return Reflect.get(target, name, receiver);
      }
    }
    throw new TypeError(name + " is not a defined property");
  }
});
```

Best Regards




On Sat, Jun 7, 2014 at 1:42 AM, André Bargull <andre.barg...@udo.edu> wrote:

> that `has:()=>true` breaks with features detections that are meant to be
>> less obtrusive than getters ... i.e. `'geolocation' in navigator` or
>> `'innerHTML' in genericNode` and all others that are not supposed to pass
>> through a potentially expensive getter to retrieve a feature detection
>> purpose info.
>>
>> Long story short that NoSuchProperty is obtrusive in an upside-down way
>> ...
>> I personally would not use that and would not expect that anywhere
>>
>
> The 'has' handler is required to work around a Firefox limitation. A
> compliant ES6 implementation only needs the 'get' handler.
>
> Related bug reports:
> https://bugzilla.mozilla.org/show_bug.cgi?id=914314
> https://bugzilla.mozilla.org/show_bug.cgi?id=1009199
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to