New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should proxies be able to lie wrt freezing? #652

Open
raulsebastianmihaila opened this Issue Aug 6, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@raulsebastianmihaila

raulsebastianmihaila commented Aug 6, 2016

      const target = Object.seal({x: 2});
      const proxy = new Proxy(target, {
        defineProperty() {
          return true;
        },

        set(target, prop, value) {
          target[prop] = value;
        }
      });

      Object.freeze(proxy);
      console.log(proxy.x); // 2
      proxy.x = 100;
      console.log(proxy.x); // 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment