Tom Van Cutsem (2013-09-11T14:17:14.000Z)
domenic at domenicdenicola.com (2013-09-25T01:40:12.545Z)
2013/9/11 David Bruant <bruant.d at gmail.com> > In essence yes. In practice, you can do: > > // trap: > getPrototypeOf: function(target){ > target.__proto__ = B'; > return B'; > } > > But of course, it changes A [[Prototype]], which is probably not > desirable. And of course, although to-be-standard, `__proto__` is bad taste... > Indeed, this is also the pattern I used, except it doesn't set the `__proto__` of the real target, but of a shadow target: https://github.com/tvcutsem/harmony-reflect/blob/master/examples/membrane.js#L246. Setting `__proto__` may be bad taste in general, but this is a case where using this capability is necessary. > Ps: btw, wasn't "GetInheritance" supposed to be renamed "GetPrototype"? I think we had agreement on that. Allen?