>
>
> It calls the unknownPrivateSymbol trap. If the trap throws, the operation
> fails. In all other cases (no trap or trap which doesn't throw), it's
> forwarded.
>

And can frozen objects be proxy targets, or no?  More generally, can a
proxy effectively override the behavior of a non-configurable, non-writable
property on the target?

    var target = Object.create(null, { foo: { writable: false,
configurable: false, value: 1 } });

    var proxy = new Proxy(target, {
      get(obj, name) { return name === "foo" ? 0 : obj[name]; }
    });

    console.log(target.foo); // 1
    console.log(proxy.foo); // 0

This this allowed?

{ Kevin }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to