(P, key, context); } } } } }, obj3 = new Proxy({ name: "obj this.bar(); } },handlers); obj3[Symbol.for("[[Prototype]]")] = [obj1, obj2]; obj3.baz(); //obj1.foo:obj -3 //obj2.bar:obj-3 如果我们要实现对象间的单继承,比如obj3继承在obj1,可以使用Object.setPrototypeOf方法,但是没法实现多继承。
obj_ref_dict obj-0: <A|x: 0> in obj_ref_dict obj-1: <A|x: 1> in obj_ref_dict obj-2: <A|x: 2> in obj_ref_dict obj from obj_ref_dict obj-0: None in obj_ref_dict obj-1: None in obj_ref_dict obj-2: None in obj_ref_dict obj