Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo{
- constructor(x, y){
- this.x = x;
- this.y = y;
- }
- }
- function Bar(x, y){
- return new Proxy(new Foo(x, y), {
- get: function(o, p, r){
- console.log(r); // <--
- return o[p];
- }
- });
- }
- class Buz extends Bar{
- zoo(){
- return "zoo!";
- }
- }
- var b = new Buz(2,3);
- b.x; // <--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement