Allen Wirfs-Brock (2013-08-07T22:02:37.000Z)
domenic at domenicdenicola.com (2013-08-12T05:10:34.117Z)
On Aug 7, 2013, at 2:41 PM, Allen Wirfs-Brock wrote: > > > A constructor that returns a proxy is probably the most common example of the exotic object use case: > > ```js > class MyExotic { > static [@@create] () {return new Proxy({ }, myHandler)} > constructor (...args) { > //initialize this value using args > } > } > ``` actually the @@create should mroe likely bebe ```js static [@@create]() { return new Proxy(Object.create(this.prototype), myHandler) } ``` One of the responsibilities of a @@create method is to setup the prototype inheritance chain of the new object.