>> ```js >> class MySuperClass {} >> >> // This function assumes that MySuperClass is an ES5 constructor function >> function MySubConstructor(foo) { >> MySuperClass.call(this); >> this.foo = foo; >> } >> MySubConstructor.prototype = Object.create(MySuperClass.prototype); >> MySubConstructor.prototype.constructor = MySubConstructor; >> ``` > > so if MySuperCall didn’t have the throw on [[Call]] behavior the above would > work just fine.
In general, I’d expect this kind of subclassing to fail, due to the new instantiation protocol. Wrong? -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss